Buildings are used as spawners and terminals for travellers. They track the number of vehicles and occupants available to said building (This will be useful when representing shops etc).
This class will extend Mono Behaviour.
Private attributes:
VehicleMax (immutable) - This value determines the maximum number of vehicles that can be spawned/stored from the building at one time.
occupantMax (immutable) - This value determines the maximum number of occupants that can be stored in the building
DestinationWeights - some distribution which determines the likelyhood of a certain type of destination (e.g. shop, house…).
Public attributes:
VehicleList (List) - list of pointers to vehicles currently at the building. These are the vehicles that may spawn from this location.
occupantCount - no. of occupants in the building.
edgeLocation - pointer to the edge that this building belongs on.
Functionality:
Getter and setter methods, as appropriate
Spawn - using an existing vehicle, generate a path and set up so that vehicle can complete journey. Insert vehicle as appropriate to the edge queue.
Add onUpdate functionality, Generate a vehicle object if some random criteria is passed (e.g. occupantCount * rand() /occupantMax > boundary). Rate of spawn should be balanced such that larger building (shops etc) should spawn at a higher rate, especially when more full. Specifics can be discussed further.
On initialisation, a some representation should appear on the UI along the appropriate edge
Further details on attributes can be found on the ER diagram (on teams)
Buildings are used as spawners and terminals for travellers. They track the number of vehicles and occupants available to said building (This will be useful when representing shops etc).
This class will extend Mono Behaviour.
Private attributes:
Public attributes:
Functionality:
Further details on attributes can be found on the ER diagram (on teams)
Specified by: Ted Proctor
Implemented by: Tomas Premoli
Validated by:
┆Issue is synchronized with this Trello card by Unito