示例#1
0
 public override void activated(Entity ent)
 {
     if (ent is Living && !(ent is Player))
     {
        ((Living)ent).freeze(this.powerLevel);
     }
 }
示例#2
0
        public bool Collide(Entity b)
        {
            float c = this.collideRadius;
            {
                float n = b.getCollideRadius();
                if (c < n) c = n;
            }

            bool x = false;
            return x;
        }
示例#3
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;
 }
示例#4
0
 public override void activated(Entity e)
 {
     //DO NOTHING WHEN STEPPED ON
 }
示例#5
0
 public override void activated(Entity ent)
 {
 }
示例#6
0
 public override void activated(Entity activator)
 {
     return;
 }
示例#7
-1
 public override void activated(Entity activator)
 {
     if (startTimer <= 0)
     {
         if (activator is Living)
         {
             ((Living)activator).damage(ATTACK_DAMAGE * this.powerLevel, Living.DamageType.Spike);
             this.acted = true;
             Sparker s = new Sparker(100, new Vector2(position.X + 32, position.Y + 32));
             s.SetGradient(Color.Yellow, Color.DarkGray);
             s.Fire();
             Living.gameParent.GetSparkerList().Add(s);
         }
     }
 }
示例#8
-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);
        }