GameFramework.EntityManager.HasCombatNpcAlive C# (CSharp) Метод

HasCombatNpcAlive() публичный Метод

public HasCombatNpcAlive ( ) : bool
Результат bool
        public bool HasCombatNpcAlive()
        {
            bool result = false;
            for (LinkedListNode<EntityInfo> linkNode = m_Entities.FirstValue; null != linkNode; linkNode = linkNode.Next) {
                EntityInfo entity = linkNode.Value;
                if (null != entity && entity.IsCombatNpc() && !entity.IsDead()) {
                    result = true;
                    break;
                }
            }
            return result;
        }

Usage Example

Пример #1
0
 static public int HasCombatNpcAlive(IntPtr l)
 {
     try {
         GameFramework.EntityManager self = (GameFramework.EntityManager)checkSelf(l);
         var ret = self.HasCombatNpcAlive();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }