示例#1
0
 public List <string> getControl()
 {
     if (!gameState.PlayerIsDead)
     {
         return(selected.getControl());
     }
     else
     {
         return(new List <string>());
     }
 }
示例#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();
            }
        }