Exemplo n.º 1
0
 public void AddTagToEntity(long entityId, string tag)
 {
     if (!tags.ContainsKey(entityId))
     {
         tags.DefineNew(entityId);
     }
     tags.AddTo(entityId, tag);
 }
Exemplo n.º 2
0
 private void Associate(Type index)
 {
     if (!collectionMap.ContainsKey(index))
     {
         collectionMap[index] = new List <SystemBase>();
     }
     else
     {
         LogEvent.Engine.Warning("Map is already associated to " + index.Name);
     }
 }
Exemplo n.º 3
0
        internal void RegisterEntityToSystem(Entity entity, SystemBase system)
        {
            if (!entitiesBySystem.ContainsKey(system.Id))
            {
                entitiesBySystem.DefineNew(system.Id);
            }

            if (!entitiesBySystem[system.Id].Contains(entity))
            {
                entitiesBySystem[system.Id].Add(entity);
                scene.Messenger.SendToSystem(new EntityChangeMessage(entity, UpdateType.Add), system, false);
            }
        }