コード例 #1
0
ファイル: PlayerControls.cs プロジェクト: tsani/tanks
    void FixedUpdate()
    {
        if (Input.GetKey(KeyCode.A))
        {
            tankController.Left();
        }

        if (Input.GetKey(KeyCode.D))
        {
            tankController.Right();
        }

        if (Input.GetKey(KeyCode.W))
        {
            tankController.Forward();
        }
        else if (Input.GetKey(KeyCode.S))
        {
            tankController.Backward();
        }
    }