VGP113 - UML AND OBJECT-ORIENTED DESIGN
Sixth deliverable – State Machine Diagram
• Model the State Machine diagram of a unit that builds attack turrets:
The Unit will be Idle until a command to build is issued to it
Once the command is issued, the unit enters the Move state
and goes to its destination
Once it reaches its destination, it will check surroundings for
enemies
If there are enemies, it will enter the Combat state where
it will shoot at them until they’re all dead. Assume this unit
is OP so it’s invincible and one shots other units.
If not, It goes to Build
When the area is clear, it goes to Build state and builds the
attack turret.
Once finished, it dies
版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。