コード例 #1
0
 public virtual void Tick(RealmTime time)
 {
     if (this is Projectile)
     {
         return;
     }
     if (interactive && Owner != null)
     {
         if (!HasConditionEffect(ConditionEffects.Stasis))
         {
             MovementBehavior.Tick(this, time);
             AttackBehavior.Tick(this, time);
             ReproduceBehavior.Tick(this, time);
         }
         foreach (var i in CondBehaviors)
         {
             if ((i.Condition & BehaviorCondition.Other) != 0 &&
                 i.ConditionMeet(this))
             {
                 i.Behave(BehaviorCondition.Other, this, time, null);
             }
         }
         posHistory[posIdx++] = new Position {
             X = X, Y = Y
         };
         ProcessConditionEffects(time);
     }
 }