Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        opponentField.SetActive(false);
        if (gameStateManager.playerOrder == 1)
        {
            shootTurn = ShootTurn.PLAYERTURN;
        }
        else
        {
            shootTurn = ShootTurn.OPPONENTTURN;
        }

        //Transform animation size to fit cell size
        goCross.transform.localScale     = GetTransformScale(goCross, 0.9f);
        goExplosion.transform.localScale = GetTransformScale(goExplosion, 2.0f);
        goSmoke.transform.localScale     = GetTransformScale(goSmoke, 1.0f);
        goWater.transform.localScale     = GetTransformScale(goWater, 2.0f);
        goBlueDot.transform.localScale   = GetTransformScale(goBlueDot, 0.5f);
        for (int i = 0; i < 2; i++)
        {
            queue[i] = new Queue <GameObject>();
        }

        canvasResult.SetActive(false);
        canvasTurn.SetActive(false);
    }
Esempio n. 2
0
 void SwitchTurn()
 {
     shootTurn = 1 - shootTurn;
     Debug.Log("Switch to " + shootTurn);
     if (shootTurn == ShootTurn.PLAYERTURN)
     {
         curTurnText = "YOUR TURN";
         canShoot    = true;
     }
     else
     {
         curTurnText = "OPPONENT'S TURN";
         canShoot    = false;
     }
 }