Exemple #1
0
    void Update()
    {
        if (!action.isGameOver())
        {
            if (Input.GetKey(KeyCode.W))
            {
                action.Forward();
            }

            if (Input.GetKey(KeyCode.S))
            {
                action.Back();
            }

            if (Input.GetKeyDown(KeyCode.Space))
            {
                action.shoot();
            }

            float offsetX = Input.GetAxis("Horizontal1");
            action.turn(offsetX);
        }
    }