Пример #1
0
        public void BackLevel()
        {
            if (ChangeLevelEvent == null)
            {
                return;
            }

            var eventArgs = new LevelEventArgs()
            {
                GameLevel = null
            };

            ChangeLevelEvent.Invoke(this, eventArgs);
        }
Пример #2
0
    void IsNextLvl()
    {
        switch (currentLevel)
        {
        case 255:
            currentLevel++;
            ChangeLevelEvent.Invoke(currentLevel);
            break;

        case 0:
            if (score >= 7)
            {
                currentLevel++;
                ChangeLevelEvent.Invoke(currentLevel);
            }
            break;

        case 1:
            if (score >= 15)
            {
                currentLevel++;
                ChangeLevelEvent.Invoke(currentLevel);
            }
            break;

        case 2:
            if (score >= 25)
            {
                currentLevel++;
                ChangeLevelEvent.Invoke(currentLevel);
            }
            break;

        case 3:
            if (score >= 35)
            {
                currentLevel++;
                ChangeLevelEvent.Invoke(currentLevel);
            }
            break;

        case 4:
            if (score >= 45)
            {
                currentLevel++;
                ChangeLevelEvent.Invoke(currentLevel);
            }
            break;
        }
    }
Пример #3
0
        public void NextLevel(GameLevel gameLevel)
        {
            if (ChangeLevelEvent == null)
            {
                return;
            }

            var eventArgs = new LevelEventArgs()
            {
                GameLevel = gameLevel
            };

            ChangeLevelEvent.Invoke(this, eventArgs);
        }