示例#1
0
        public static void AddScore(CreepAgent creep)
        {
            var points = creep.Settings.Points;

            Instance.m_creepPooling.HideCreep(creep);

            Instance.m_score += points;
            Instance.m_levelUI.UpdateTextScore(Instance.m_score);

            Instance.m_gold += points;
            Instance.m_levelUI.UpdateTextGold(Instance.m_gold);
        }
示例#2
0
        public static void LoseLife(CreepAgent creep)
        {
            Instance.m_creepPooling.HideCreep(creep);

            Instance.m_lives--;

            if (Instance.m_lives > 0)
            {
                SoundManager.PlaySoundEffect("LoseLife");

                Instance.m_levelUI.UpdateTextLives(Instance.m_lives);
            }
            else
            {
                IsPlaying = false;

                Instance.CheckBestScore();

                Instance.m_levelUI.GameOver(Instance.m_bestScore, Instance.m_score);
            }
        }