Beispiel #1
0
    // Called every physics update
    void FixedUpdate()
    {
        // Get input from joysticks
        Vector2 move  = new Vector2(moveStick.GetAxis("Horizontal"), moveStick.GetAxis("Vertical"));
        Vector2 shoot = new Vector2(shootStick.GetAxis("Horizontal"), shootStick.GetAxis("Vertical"));

        // Call the control script to move and shoot the tank
        control.Control(move, shoot);
    }
Beispiel #2
0
    // Called every physics update
    void FixedUpdate()
    {
        // TODO: get input from player
        Vector2 move  = new Vector2();
        Vector2 shoot = new Vector2();

        // Call the control script to move and shoot the tank
        control.Control(move, shoot);
    }