Esempio n. 1
0
        public FireJutsu(Level level)
        {
            this.level = level;
            sprites    = new List <BaseSprite>();

            Random random    = new Random();
            int    fireballs = random.Next(1, 4);

            int i = 0;

            while (i < fireballs)
            {
                int           x      = random.Next(0, 600);
                int           y      = random.Next(0, 500);
                GenericSprite sprite = (GenericSprite)SpriteFactory.Instance.GetSprite(SpriteTypes.Type.Fireball);
                sprite.Position = new Vector2(x, y);
                sprites.Add(sprite);

                i++;
            }

            SoundManager.Instance.PlaySFX(SoundTypes.Type.fireball);


            void Destroy()
            {
                Remove(level);
            }

            DelayTimer.Create(6000, Destroy);
        }
Esempio n. 2
0
        public PoisonJutsu(Level level)
        {
            this.level = level;
            sprites    = new List <BaseSprite>();

            this.random = new Random();
            int p = random.Next(10, 15);

            int i = 0;

            while (i < p)
            {
                int        x      = random.Next(0, 750);
                int        y      = random.Next(0, 550);
                BaseSprite sprite = SpriteFactory.Instance.GetSprite(SpriteTypes.Type.felspell);
                sprite.Position = new Vector2(x, y);
                sprites.Add(sprite);

                i++;
            }

            SoundManager.Instance.PlaySFX(SoundTypes.Type.felspell);


            void Destroy()
            {
                Remove(level);
            }

            DelayTimer.Create(12000, Destroy);
        }
Esempio n. 3
0
        public DarkJutsu(Level level)
        {
            this.level = level;
            sprites    = new List <BaseSprite>();

            BaseSprite dark1 = SpriteFactory.Instance.GetSprite(SpriteTypes.Type.nebula);
            BaseSprite dark2 = SpriteFactory.Instance.GetSprite(SpriteTypes.Type.nebula);
            BaseSprite dark3 = SpriteFactory.Instance.GetSprite(SpriteTypes.Type.nebula);
            BaseSprite dark4 = SpriteFactory.Instance.GetSprite(SpriteTypes.Type.nebula);
            BaseSprite dark5 = SpriteFactory.Instance.GetSprite(SpriteTypes.Type.nebula);

            dark1.Position = new Vector2(300f, 300f);
            dark2.Position = new Vector2(500f, 300f);
            dark3.Position = new Vector2(400f, 400f);
            dark4.Position = new Vector2(400f, 500f);
            dark5.Position = new Vector2(400f, 300f);

            sprites.Add(dark1);
            sprites.Add(dark2);
            sprites.Add(dark3);
            sprites.Add(dark4);
            sprites.Add(dark5);

            this.random = new Random();

            SoundManager.Instance.PlaySFX(SoundTypes.Type.dark);


            void Destroy()
            {
                Remove(level);
            }

            DelayTimer.Create(12000, Destroy);
        }
Esempio n. 4
0
        public static DelayTimer Create(float Interval, Action Trigger, string timerType = "")
        {
            DelayTimer Timer = new DelayTimer()
            {
                Interval = Interval, Trigger = Trigger, Type = timerType
            };

            TimerManager.Add(Timer);
            return(Timer);
        }
Esempio n. 5
0
        public FreezingJutsu(Level level)
        {
            this.level = level;
            sprites    = new List <BaseSprite>();

            BaseSprite freezing1 = SpriteFactory.Instance.GetSprite(SpriteTypes.Type.freezingSpirit);
            BaseSprite freezing2 = SpriteFactory.Instance.GetSprite(SpriteTypes.Type.freezingSpirit);
            BaseSprite freezing3 = SpriteFactory.Instance.GetSprite(SpriteTypes.Type.freezingSpirit);
            BaseSprite freezing4 = SpriteFactory.Instance.GetSprite(SpriteTypes.Type.freezingSpirit);
            BaseSprite freezing5 = SpriteFactory.Instance.GetSprite(SpriteTypes.Type.freezingSpirit);
            BaseSprite freezing6 = SpriteFactory.Instance.GetSprite(SpriteTypes.Type.freezingSpirit);
            BaseSprite freezing7 = SpriteFactory.Instance.GetSprite(SpriteTypes.Type.freezingSpirit);
            BaseSprite freezing8 = SpriteFactory.Instance.GetSprite(SpriteTypes.Type.freezingSpirit);

            freezing1.Position = new Vector2(0f, 0f);
            freezing2.Position = new Vector2(700f, 0f);
            freezing3.Position = new Vector2(0f, 500f);
            freezing4.Position = new Vector2(700f, 500f);
            freezing5.Position = new Vector2(400f, 0f);
            freezing6.Position = new Vector2(400f, 500f);
            freezing7.Position = new Vector2(0f, 300f);
            freezing8.Position = new Vector2(700f, 300f);

            sprites.Add(freezing1);
            sprites.Add(freezing2);
            sprites.Add(freezing3);
            sprites.Add(freezing4);
            sprites.Add(freezing5);
            sprites.Add(freezing6);
            sprites.Add(freezing7);
            sprites.Add(freezing8);

            SoundManager.Instance.PlaySFX(SoundTypes.Type.freezing);


            void Destroy()
            {
                Remove(level);
            }

            DelayTimer.Create(10000, Destroy);
        }