Hi all,
I have some code that does the following:
- move player around by changing his velocity/position
- when player hits a button, the character stops and targets an enemy
- by default the engine targets the closes enemy instance, but as long as in "targeting mode" the player can chose to move target to a different enemy just by moving "left/right"
They way I do this is first by detecting whether we're in targeting mode or not:
Input.GetAxis vs Input.GetKey
I have some code that does the following:
- move player around by changing his velocity/position
- when player hits a button, the character stops and targets an enemy
- by default the engine targets the closes enemy instance, but as long as in "targeting mode" the player can chose to move target to a different enemy just by moving "left/right"
They way I do this is first by detecting whether we're in targeting mode or not:
Code (CSharp):
- // if SPACE is pressed, enter scoping mode,...