Fission FSN
Loading...
Searching...
No Matches
gfCArrivalDirectorSim.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: gfCArrivalDirectorSim.h
4*
5* Purpose: Headless guest arrival timing: a fixed spawn interval up to a
6* day's guest cap. Catalogue-driven weighted group selection lives
7* in gfCParkDaySim; this class only decides when an arrival occurs.
8*
9*********************************************************************/
10
11#ifndef gfCArrivalDirectorSimhdr
12#define gfCArrivalDirectorSimhdr
13
14#include <fsCore/fsBaseTypes.h>
15
17{
18public:
19
20 gfCArrivalDirectorSim(fsS32 pSpawnIntervalMs, fsS32 pMaxGuests);
21
22 // Returns true the tick a new visitor should be spawned - never more than
23 // the current quota in this director's lifetime.
24 fsBool tick(fsS32 pDeltaMs, fsS32 pGuestsSpawnedSoFar);
25
26 // Entrance upgrades may raise the quota during a day. Lowering it never
27 // removes visitors already admitted; it only prevents further arrivals.
28 void maxGuestsSet(fsS32 pMaxGuests) { mMaxGuests = pMaxGuests > 0 ? pMaxGuests : 0; }
29 fsS32 maxGuestsGet() const { return mMaxGuests; }
30
31private:
32
33 fsS32 mSpawnIntervalMs;
34 fsS32 mMaxGuests;
35 fsS32 mTimeSinceLastSpawnMs;
36};
37
38#endif
fsS32 maxGuestsGet() const
Definition gfCArrivalDirectorSim.h:29
fsBool tick(fsS32 pDeltaMs, fsS32 pGuestsSpawnedSoFar)
Definition gfCArrivalDirectorSim.cpp:11
void maxGuestsSet(fsS32 pMaxGuests)
Definition gfCArrivalDirectorSim.h:28
gfCArrivalDirectorSim(fsS32 pSpawnIntervalMs, fsS32 pMaxGuests)
Definition gfCArrivalDirectorSim.cpp:4
bool fsBool
Definition fsBaseTypes.h:26
int fsS32
Definition fsBaseTypes.h:20