Exemple #1
0
 public Explosion(Vector2 position, ParticleEmitter emitter, int burst = 5)
     : base()
 {
     emit = emitter;
     Position = position;
     emit.Burst(position, burst);
 }
Exemple #2
0
 public Laser(EnemyRanged e)
 {
     owner = e;
     lastHit = 0;
     timer = 0;
     emitter = ParticleFactory.CreateStream(Color.Fuchsia, 4, 2, 64);
 }
Exemple #3
0
 public TeleBoss()
     : base(new Vector2(Screen.X, 0))
 {
     Tesseract.Engine.GameWorld.GameState.InstantiateCurrent(new StoryElement(LevelManager.world.Reward));
     emitter = ParticleFactory.CreateStream(Color.Violet, 4, 2, 64);
     stateTime = 0;
     health = 8;
     nBuild.PolyColor = Color.Indigo;
     radius *= 1.5f;
     Invulnerable = true;
     SetState(TeleState.Left);
     leftOrb = new EnemyMelee(Vector2.Zero, 8);
     leftOrb.nBuild.PolyColor = (Color.Yellow);
     leftOrb.speed = 0;
     leftOrb.health = 8;
     rightOrb = new EnemyMelee(Vector2.Zero, 8);
     rightOrb.nBuild.PolyColor = (Color.Yellow);
     rightOrb.speed = 0;
     rightOrb.health = 8;
     orbRad = leftOrb.radius;
 }
Exemple #4
0
        public SpinningBoss()
            : base(new Vector2(Screen.X, 0))
        {
            Tesseract.Engine.GameWorld.GameState.InstantiateCurrent(new StoryElement(LevelManager.world.Reward));
            lastHit = -(float)Math.PI / 2;
            leftPieces = new List<Enemy>();
            rightPieces = new List<Enemy>();
            emitter = ParticleFactory.CreateStream(Color.Fuchsia, 4, 2, 64);

            for (int i = 0; i < 3; ++i)
            {
                EnemyMelee em = new EnemyMelee(Vector2.Zero, -1);
                em.radius *= 0.75f;
                leftPieces.Add(em);
            }
            for (int i = 0; i < 3; ++i)
            {
                EnemyMelee em = new EnemyMelee(Vector2.Zero, -1);
                em.radius *= 0.75f;
                rightPieces.Add(em);
            }
            leftOrb = new EnemyMelee(Vector2.Zero, -1);
            leftOrb.radius *= 1.5f;
            leftOrb.nBuild.PolyColor = Color.Fuchsia;
            leftOrb.Invulnerable = true;
            rightOrb = new EnemyMelee(Vector2.Zero, -1);
            rightOrb.radius *= 1.5f;
            rightOrb.nBuild.PolyColor = Color.Fuchsia;
            rightOrb.Invulnerable = true;

            spinTarget = Rotation + 1;
            Rotation = 0;
            state = SpinState.Spin;
            stateTime = 0;
            health = 8;
            nBuild.PolyColor = Color.Fuchsia;
            radius *= 1.5f;
            Invulnerable = true;
        }
Exemple #5
0
 public WormBoss()
     : base(new Vector2(Screen.X, 0))
 {
     emitter = ParticleFactory.CreateStream(Color.Violet, 4, 2, 64);
     stateTime = 0;
     health = 8;
     nBuild.PolyColor = Color.Brown;
     radius *= 1.5f;
     Invulnerable = true;
     Enemy o = new EnemyMelee(new Vector2((float)(Position.X - (radius * 1.5)), (float)Position.Y), 5);
     o.radius = radius / 2;
     Tail.Add(o);
     for (int i = 0; i < 6; i++)
     {
         o = new EnemyMelee(new Vector2((float)(Tail.Last().Position.X-(Tail.Last().radius)),(float)Tail.Last().Position.Y),5);
         o.radius = radius / 2;
         if (i == 5)
             o.nBuild.PolyColor = Color.Red;
         Tail.Add(o);
     }
     SetState(WormState.Left);
 }
        public static ParticleEmitter CreateStream(Color c, float time, float speed, float scaleMax)
        {
            ParticleData data = new ParticleData();
            data.Blend = ColorBlendMode.TimeLerp;
            data.Bounce = BounceMode.None;
            data.Colors = new Color[] { Color.White, c, Color.Black };
            data.MaxSides = 2;
            data.MinSides = 2;
            data.MaxSpeed = speed + 0.5f;
            data.MinSpeed = speed;
            data.MaxTime = time + 1;
            data.MinTime = time;
            data.Rotation = RotationMode.Direction;
            data.RotationMult = 1;
            data.Scale = ScaleMode.Time;
            data.ScaleMax = scaleMax;
            data.ScaleMin = 1;

            ParticleEmitter emitter = new ParticleEmitter(data);

            return emitter;
        }