Beispiel #1
0
 public void setupShip(FourPlayerShip ship)
 {
     ship.controller = joysticks[ship.player - 1];
     if (ship.player == keyboard)
     {
         ship.isController = false;
     }
 }
Beispiel #2
0
    public void BaseDies(int dead)
    {
        if (mIsAlive[dead - 1])
        {
            mIsAlive[dead - 1] = false;
            mPlayersAlive--;
        }

        Debug.Log("dead: " + dead);
        if (dead == 2)
        {
            FourPlayerShip ship = GameObject.Find("BlueShip").GetComponent <FourPlayerShip>();
            ship.killShip();
        }
        else if (dead == 1)
        {
            FourPlayerShip ship = GameObject.Find("OrangeShip").GetComponent <FourPlayerShip>();
            ship.killShip();
        }
        else if (dead == 3)
        {
            FourPlayerShip ship = GameObject.Find("ChartreuseShip").GetComponent <FourPlayerShip>();
            ship.killShip();
        }
        else if (dead == 4)
        {
            FourPlayerShip ship = GameObject.Find("PeriwinkleShip").GetComponent <FourPlayerShip>();
            ship.killShip();
        }
        if (mPlayersAlive <= 1)
        {
            for (int i = 0; i < 4; ++i)
            {
                if (mIsAlive[i])
                {
                    RoundEnd(i + 1);
                    break;
                }
            }
        }
    }
Beispiel #3
0
 public void setupShip(FourPlayerShip ship)
 {
     sTheGameState.setupShip(ship);
 }