Beispiel #1
0
        public bool LevelUp()
        {
            if (!IsActive)
            {
                Position  = owner.Position;
                IsActive  = true;
                currLevel = 0;

                PlayAudio(clipOnPicked);
                texture = textures[(int)currLevel];
            }
            else if (currLevel != Level.THIRD)
            {
                currLevel++;

                if (currLevel == Level.THIRD)
                {
                    AudioManager.SetNewAudioBackground(CLIP_INVINCIBILITY);
                    machine.Switch((int)Level.THIRD);
                    return(true);
                }
                else
                {
                    PlayAudio(clipOnPicked);
                }

                texture = textures[(int)currLevel];
            }

            return(false);
        }