henrywangzh / Xinshen

Xinshen [SRS23]
3 stars 1 forks source link

[Programming:Enemy] Grunt Behaviour #17

Open henrywangzh opened 1 year ago

henrywangzh commented 1 year ago

This task deals with the movement and attacks of a grunt enemy.

Upon spawn, this enemy will patrol an area.

It will have 3 ranges: attack range, combat range, detection range. You can think of them as 3 concentric circles, each larger than the previous.

If the player is in the combat range, the enemy will walk towards the player.

If the player is in attack range, the enemy will begin attacking the player on a fixed attack timer.

If the player leaves the detection range, the enemy will return to patrolling.