Exemplo n.º 1
0
 public override void activated(Entity ent)
 {
     if (startupTimer > 0) return;
     if (ent is Living)
     {
         ent.setPos(Vector2.Lerp(position, ent.getPos(), 10*(0.001f/Vector2.Distance(ent.getPos(), this.position))));
         if (Vector2.Distance(ent.getPos(), this.position) < activationDistance)
         {
             ((Living)ent).damage(5000, Living.DamageType.Burn);
             Living.gameParent.GetSparkerList().Add(new Sparker(100,
         new Vector2(position.X - 32, position.Y - 32), false, 0, 0, Decal.gibFactory()));
         }
     }
     startupTimer = 45;
 }
Exemplo n.º 2
-1
        public override void activated(Entity activator)
        {
            MarkRune m = null;
            for(int i = 0; i < Living.gameParent.GetRuneList().Count; i++)
            {
                if(Living.gameParent.GetRuneList()[i] is MarkRune)
                {
                    m = (MarkRune)Living.gameParent.GetRuneList()[i];
                    break;
                }
            }
            if (m != null) return;
            activator.setPos(new Vector2(m.getPos().X + 64, m.getPos().Y + 64));

            Sparker s = new Sparker(50, new Vector2(activator.getPos().X - 32,
                    activator.getPos().Y - 32));
            s.SetGradient(Color.Magenta, Color.Maroon);
            s.Fire();
            Living.gameParent.GetSparkerList().Add(s);
        }