/// <summary> /// This method handles interaction with the body. Everything should already be planned. /// </summary> private void Act() { DetectObstacles();//TODO: move this to Think when we do not need to debug it if (doJump) { character.Jump(); doJump = false; } if (doFire) { character.Fire(); } character.Run(run); }
void FixedUpdate() { if (doJump) { character.Jump(); doJump = false; } character.Run(run); if (doFire) { character.Fire(); doFire = false; } else if (doAutoFire) { //Weapon will only respond if it has autofire character.AutoFire(); } }