UIC-SIGGames / SigGame2020Shooter

0 stars 0 forks source link

Enemy AI #9

Closed pizzatree closed 4 years ago

pizzatree commented 4 years ago

Added StateMachine Ticks the active state and listens for which state to switch to next. Can interrupt an active state.

Added Abstract EnemyState Supports ticking and interrupting. Provides a base implementation of interruptions

Added Abstract aEnemy Basis for enemies Takes care of routing interruptions to the state machine Moves with respect to inputs from the state machine

Generic States State_Dead -> Handles spawning batteries and destroying self State_Stunned -> Sets a timer where no inputs will be sent to enemy for movement SetTypes method is for sending specific pursuit and seek scripts When timer runs out, checks for targets within "targetScanRadius" -> if a target is found, goes to pursuit - else goes to seek.

Added Enemy Charger Still needs more work but it's functional Seeks out a target with raycasts -> if found, goes into pursuit Pursuit attempts to get closer to target, if within "ChargeRange" goes into charge - else goes back to seek Charge attempts to predict target movement, then charges in that direction -> then waits for "RecoveryTime" and returns to pursuit.