public void LogWarning(object v)
 {
     if (IsDebugOn)
     {
         ECSDebug.LogWarning(v);
     }
 }
Beispiel #2
0
        public bool HasComponent(int entityID, Type type)
        {
            if (GetComponentID(type) == -1)
            {
                ECSDebug.LogWarning("[HasComponent " + type.Name + "] Component not yet registered " + type.Name.ToString());
                return(false);
            }

            if (HasComponentBag(entityID) == false)
            {
                return(false);
            }

            Bag <ECSComponent> bag = GetComponentBag(entityID);

            if (bag.Get(GetComponentID(type)) == null)
            {
                return(false);
            }

            return(true);
        }
        public void DestroyEntity(int entityID)
        {
            ECSEntity entity = m_entityBag.Get(entityID);

            if (entity == null)
            {
                ECSDebug.LogWarning("Tried to destroy entity " + entityID + " but is already destroyed");
                return;
            }

            if (OnEntityDestroyedPre != null)
            {
                OnEntityDestroyedPre(entity);
            }

            m_entityFactory.DestroyEntity(entity);
            m_entityBag.Set(entityID, null);

            if (OnEntityDestroyedPost != null)
            {
                OnEntityDestroyedPost(entity);
            }
        }
Beispiel #4
0
 private void LogWarning()
 {
     ECSDebug.LogWarning("ECSComponentFactory not provided.. using " + GetType().Name);
 }
 public void DestroyEntity(ECSEntity entity)
 {
     ECSDebug.LogWarning("EntityFactory was not provided.. Using " + GetType().Name);
 }
 public ECSEntity CreateEntity()
 {
     ECSDebug.LogWarning("EntityFactory was not provided.. Using " + GetType().Name);
     return(new ECSEntity());
 }
 public ECSEntity SetupEntity(ECSEntity e, string archetype)
 {
     ECSDebug.LogWarning("EntityFactory was not provided.. Using " + GetType().Name);
     return(e);
 }
 protected void OnComponentDeInitializeFailure(ECSComponent component, string reason)
 {
     ECSDebug.LogWarning("DeInitializing Component " + component.GetType().Name + " failed. Reason: " + reason);
 }
Beispiel #9
0
 protected void LogWarning(object v)
 {
     ECSDebug.LogWarning(SYSTEM_LOG_PREFIX + v);
 }