Source
Entities
- non-playable sandbox
- there are resources of petrol and iron
- the bots need to bring them to the warehouse
- if the warehouse contains enough cargo (30 iron and 10 petrol), the factory will build a new bot
- every source has got their own capacity - if the capacity is exhausted, its icon will turn black
States
Component Model
- the whole model is stored in
model.ts
GameModel
contains the map and global attributesBotModel
is a model for each botCargoSourceModel
is a model for iron ores and petrol rigsWarehouseModel
and FactoryModel
are models for the buildings- components attached to bots are responsible for movement and AI logic
- AI logic is implemented in
BotAI
component - the bots use pathfinding and steering behavior for movement
- each state handler has their own method
processIdleState
processGoingToLoadState
processGoingToUnloadState
processLoadingState
processUnloadingState