ioxu / key

Key, a game made with the Godot Engine 4.
MIT License
6 stars 1 forks source link

add delay between seeing player and entering attack #12

Open ioxu opened 3 years ago

ioxu commented 3 years ago

When npc notices player there should be a little delay before entering attack. It is too abrupt. Add a big ! symbol above their heads. Do a little jump (is gravity applied to NPCs?).

Start a timer in _attack_enter(), set alarm icon, and do a little jump. In _attack(delta) check if alarm timer is > alarm time, and then enable the movement block after rotate_toward_target(delta), here: https://github.com/ioxu/key/blob/6e6985241c98e9ad406f4656f885995e3f22b99f/data/enemies/Enemy.gd#L200

ioxu commented 3 years ago

Should probably generalise to add delay whenever a communication signal is received, too.