AI Behaviour tree
The enemy will stand still and try to shoot the player if they have vision.
The elevator: my one and only navmesh switcher.
SUPERHOT has a simple and predictable AI, which fits the puzzle/action gameplay really well. It allows the player to make strategies around how the enemy behaves.
This also worked in my favor as it was relatively easy to implement, my enemies have five states:
Self explanatory, if the player is close enough, punch the player.
If the AI has clear vision on the target they fire a bullet. As long as the player is in vision the AI will stand and wait until their fire cooldown is completed.
Walk towards player:
Also self explanatory. If there's a clear path towards the player, walk along it.
Walk towards navmesh switcher:
my level has two navmeshes, one on the bridge and one on the platform below. Right now there is only one navmesh switcher: the elevator. when an AI is inside the navmesh switcher the elevator takes them to the other navmesh.
If there's no way for the AI to reach the player they go into an idle state, such is the case for the two AI standing in the train before the doors open.