Exemplo n.º 1
0
 public List <string> getControl()
 {
     if (!gameState.PlayerIsDead)
     {
         return(selected.getControl());
     }
     else
     {
         return(new List <string>());
     }
 }
Exemplo n.º 2
0
        public void FixedUpdate()
        {
            var move = controls.getControl();

            if (move.Contains("forward"))
            {
                moveForward();
            }
            if (move.Contains("back"))
            {
                moveBack();
            }
            if (move.Contains("left"))
            {
                moveLeft();
            }
            if (move.Contains("right"))
            {
                moveRight();
            }
        }