Beispiel #1
0
    void StateManager()
    {
        if (fireCat.projectile.GetComponent <PlayerCatatuptBallTurnFinished>().Endplayersturn == true)
        {
            myStates          = DifferentGameStates.EnermysTurn;
            IsenermyTurn      = true;
            isPlayerCanAttack = false;
        }

        if (fireCat.projectile.GetComponent <PlayerCatatuptBallTurnFinished>().Endplayersturn == false)
        {
            myStates          = DifferentGameStates.PlayersTurn;
            IsenermyTurn      = false;
            isPlayerCanAttack = true;
        }

        if (endTheGame.isHasPlayerWon == true && endTheGame.isHasEnermyWon == false)
        {
            myStates = DifferentGameStates.Win;
        }

        if (endTheGame.isHasPlayerWon == false && endTheGame.isHasEnermyWon == true)
        {
            myStates = DifferentGameStates.Lose;
        }
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        isRunning       = false;
        isEnermyRunning = false;

        fireCat  = GameObject.FindGameObjectWithTag("FireCatapult").GetComponent <FireCatapult>();
        myStates = DifferentGameStates.PlayersTurn;
        AIC      = GameObject.FindGameObjectWithTag("AIFireCatapult").GetComponent <AICatapult>();

        //playerProjectile.GetComponent<PlayerCatatuptBallTurnFinished>();
        // enermyProjectile.GetComponent<EnermyProjectileTurn>();
        playerProjectile.GetComponentInChildren <PlayerCatatuptBallTurnFinished> ();
    }