Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        if (DriverType == DriveType.Keyboard)
        {
            if (UnityEngine.Input.GetAxisRaw("UP") == 1f)
            {
                move.MoveCommand(IO.DirectionTypes.UP, speed);
            }

            if (UnityEngine.Input.GetAxisRaw("DOWN") == 1f)
            {
                move.MoveCommand(IO.DirectionTypes.DOWN, speed);
            }

            if (UnityEngine.Input.GetAxisRaw("LEFT") == 1f)
            {
                move.MoveCommand(IO.DirectionTypes.LEFT, speed);
            }

            if (UnityEngine.Input.GetAxisRaw("RIGHT") == 1f)
            {
                move.MoveCommand(IO.DirectionTypes.RIGHT, speed);
            }
        }
    }