private void Update() { if (gameController.GameState == GameState.Playing) { mover.Move(); } }
public void Update() { var gameState = gameController.GameState; if (gameState == GameState.PLAYING) { translateMover.Move(); } }
// Update is called once per frame private void Update() { if (Input.GetKeyDown(upKey)) { translateMover.Move(Vector3.up); } if (Input.GetKeyDown(downKey)) { translateMover.Move(Vector3.down); } if (Input.GetKeyDown(rightKey)) { translateMover.Move(Vector3.right); } if (Input.GetKeyDown(leftKey)) { translateMover.Move(Vector3.left); } }