Exemplo n.º 1
0
        private void UpdateRankDisplay()
        {
            if (turret)
            {
                if (lastRank != GameManager.Ranks.None)
                {
                    rankImages[(int)turret.thisRank - 2].SetActive(false);
                }

                rankImages[(int)turret.thisRank - 1].SetActive(true);
                lastRank = turret.thisRank;
            }
            else if (shaft)
            {
                if (lastRank != GameManager.Ranks.None)
                {
                    rankImages[(int)shaft.currentRank - 2].SetActive(false);
                }

                rankImages[(int)shaft.currentRank - 1].SetActive(true);
                lastRank = shaft.currentRank;
            }
            else if (missile)
            {
                if (lastRank != GameManager.Ranks.None)
                {
                    rankImages[(int)missile.currentRank - 2].SetActive(false);
                }

                rankImages[(int)missile.currentRank - 1].SetActive(true);
                lastRank = missile.currentRank;
            }
        }
Exemplo n.º 2
0
        private void CheckForNewRank()
        {
            if (timesUsed == rankUpRequirements[0])
            {
                currentRank = gm.Rankup(GameManager.Ranks.None);
                am.Play("levelup", .35f, Random.Range(.85f, 1.15f));
                duration += .5f;
                //flicker.shouldFlicker = true;
            }

            if (timesUsed == rankUpRequirements[1])
            {
                currentRank = gm.Rankup(GameManager.Ranks.Chev1);
                am.Play("levelup", .35f, Random.Range(.85f, 1.15f));
                duration     += .5f;
                cooldownStart = 9;
                //flicker.shouldFlicker = true;
            }

            if (timesUsed == rankUpRequirements[2])
            {
                currentRank = gm.Rankup(GameManager.Ranks.Chev2);
                am.Play("levelup", .35f, Random.Range(.85f, 1.15f));
                duration     += .5f;
                cooldownStart = 8;
                //flicker.shouldFlicker = true;
            }

            if (timesUsed == rankUpRequirements[3])
            {
                currentRank = gm.Rankup(GameManager.Ranks.Chev3);
                am.Play("levelup", .35f, Random.Range(.85f, 1.15f));
                duration += .5f;
                //flicker.shouldFlicker = true;
            }

            if (timesUsed == rankUpRequirements[4])
            {
                currentRank = gm.Rankup(GameManager.Ranks.Star1);
                am.Play("levelup", .35f, Random.Range(.85f, 1.15f));
                duration     += .5f;
                cooldownStart = 7;
                //flicker.shouldFlicker = true;
            }

            if (timesUsed == rankUpRequirements[5])
            {
                currentRank = gm.Rankup(GameManager.Ranks.Star2);
                am.Play("levelup", .35f, Random.Range(.85f, 1.15f));
                cooldownStart = 6;
                //flicker.shouldFlicker = true;
            }
        }
Exemplo n.º 3
0
        private void CheckForNewRank()
        {
            if (timesUsed == rankUpRequirements[0])
            {
                currentRank = gm.Rankup(GameManager.Ranks.None);
                am.Play("levelup", .35f, Random.Range(.85f, 1.15f));
                //flicker.shouldFlicker = true;
            }

            if (timesUsed == rankUpRequirements[1])
            {
                currentRank = gm.Rankup(GameManager.Ranks.Chev1);
                am.Play("levelup", .35f, Random.Range(.85f, 1.15f));
                missileDelay = 1.75f;
                //flicker.shouldFlicker = true;
            }

            if (timesUsed == rankUpRequirements[2])
            {
                currentRank = gm.Rankup(GameManager.Ranks.Chev2);
                am.Play("levelup", .35f, Random.Range(.85f, 1.15f));
                missileDelay = 1.5f;
                //flicker.shouldFlicker = true;
            }

            if (timesUsed == rankUpRequirements[3])
            {
                currentRank = gm.Rankup(GameManager.Ranks.Chev3);
                am.Play("levelup", .35f, Random.Range(.85f, 1.15f));
                missileDelay = 1.25f;
                //flicker.shouldFlicker = true;
            }

            if (timesUsed == rankUpRequirements[4])
            {
                currentRank = gm.Rankup(GameManager.Ranks.Star1);
                am.Play("levelup", .35f, Random.Range(.85f, 1.15f));
                missileDelay = 1f;
                //flicker.shouldFlicker = true;
            }

            if (timesUsed == rankUpRequirements[5])
            {
                currentRank = gm.Rankup(GameManager.Ranks.Star2);
                am.Play("levelup", .35f, Random.Range(.85f, 1.15f));
                missileDelay = .5f;
                //flicker.shouldFlicker = true;
            }
        }