Beispiel #1
0
 public override void Tick(RealmTime time)
 {
     if (HP > duration / 2)
     {
         BehaviorBase.ValidateAndMove(this,
                                      X + direction.X * speed * time.thisTickTimes / 1000,
                                      Y + direction.Y * speed * time.thisTickTimes / 1000
                                      );
     }
     if (HP < 250 && !exploded)
     {
         exploded = true;
         Owner.BroadcastPacket(new ShowEffectPacket
         {
             EffectType = EffectType.AreaBlast,
             Color      = new ARGB(0xffff0000),
             TargetId   = Id,
             PosA       = new Position {
                 X = 1
             }
         }, null);
     }
     base.Tick(time);
 }