Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Design
- ## Actor
- |
- |
- |---> Unit_States (Interfaces: Includes both Soldiers and Villagers)
- | |----------> Attack_State
- | |----------> Move_State
- | |----------> Idle_State
- | |----------> Dead_State
- |
- |---> Factory_States (Interfaces)
- | |----------> Build_State
- | |----------> Idle_State
- | |----------> Produce_State
- |
- |---> Actor (Class)
- | |----------> id
- | |----------> increment_id
- | |----------> player_id
- | |----------> hp
- | |----------> max_hp
- | |----------> position
- | |----------> actor_type
- |
- |---> Unit (Class: public Actor)
- | |----------> unit_type
- | |----------> unit_state
- | |----------> speed
- | |----------> attack_range
- | |----------> attack_damage
- | |----------> attack_target
- | |----------> destination
- | |----------> is_destination_set
- | |----------> new_position
- |
- |---> Factory (Class: public Actor)
- |----------> factory_type (factory_type: [VILLAGER, SOLDIER])
- |----------> factory_state (factory_state: [BUILD, IDLE, PRODUCE])
- |----------> build_rate (double: Build percent increase per unit per move)
- |----------> build_rate_limit (double: Max rate at which build can be done)
- |----------> build_percent (double: Percentage of build complete)
- |----------> is_complete (bool: If build is complete)
- |----------> spawn_timer (time_t: Time taken to spawn a single unit)
Add Comment
Please, Sign In to add comment