Exemple #1
0
 public DeferredEntity(AEntity entity, Vector3 drawPosition, int z)
     : base(entity.Serial, entity.Map)
 {
     m_BaseView     = GetBaseView(entity);
     m_DrawPosition = drawPosition;
     Position.Set(int.MinValue, int.MinValue, z);
 }
Exemple #2
0
 AEntityView GetBaseView(AEntity entity)
 {
     if (entity is Mobile)
     {
         return((MobileView)entity.GetView());
     }
     if (entity is Corpse)
     {
         return((MobileView)entity.GetView());
     }
     if (entity is LightningEffect)
     {
         return((LightningEffectView)entity.GetView());
     }
     if (entity is AnimatedItemEffect)
     {
         return((AnimatedItemEffectView)entity.GetView());
     }
     if (entity is MovingEffect)
     {
         return((MovingEffectView)entity.GetView());
     }
     Tracer.Critical("Cannot defer this type of object.");
     return(null);
 }
Exemple #3
0
        public Overhead(AEntity parent, MessageTypes msgType, string text)
            : base(parent.Serial, parent.Map)
        {
            Parent      = parent;
            MessageType = msgType;
            Text        = text;

            string plainText = text.Substring(text.IndexOf('>') + 1);

            // Every speech message lasts at least 2.5s, and increases by 100ms for every char, to a max of 10s
            m_TimePersist = 2500 + (plainText.Length * 100);
            if (m_TimePersist > 10000)
            {
                m_TimePersist = 10000;
            }
        }