Пример #1
0
            public void SetFoldOutData(ME.ECS.IStorage storage, EntityId entityId, bool state)
            {
                List <EntityId> list;

                if (this.foldoutStorageData.TryGetValue(storage, out list) == true)
                {
                    if (state == true)
                    {
                        if (list.Contains(entityId) == false)
                        {
                            list.Add(entityId);
                        }
                    }
                    else
                    {
                        list.Remove(entityId);
                    }
                }
                else
                {
                    if (state == true)
                    {
                        list = new List <EntityId>();
                        list.Add(entityId);
                        this.foldoutStorageData.Add(storage, list);
                    }
                }
            }
Пример #2
0
            public bool IsFoldOutData(ME.ECS.IStorage storage, EntityId entityId)
            {
                List <EntityId> list;

                if (this.foldoutStorageData.TryGetValue(storage, out list) == true)
                {
                    return(list.Contains(entityId));
                }

                return(false);
            }
Пример #3
0
 public void SetFoldOut(ME.ECS.IStorage storage, bool state)
 {
     if (state == true)
     {
         if (this.foldoutStorages.Contains(storage) == false)
         {
             this.foldoutStorages.Add(storage);
         }
     }
     else
     {
         this.foldoutStorages.Remove(storage);
     }
 }
Пример #4
0
 public bool IsFoldOut(ME.ECS.IStorage storage)
 {
     return(this.foldoutStorages.Contains(storage));
 }