예제 #1
0
 public void AddWithEntity(T item)
 {
     if (EntityCtrl.AddEntity(item))
     {
         base.Add(item);
     }
 }
예제 #2
0
 public bool RemoveWithEntity(T item)
 {
     if (EntityCtrl.DeleteEntity(item))
     {
         return(base.Remove(item));
     }
     return(false);
 }
예제 #3
0
 public void CreateSubmit()
 {
     if (!IsCreatingMode || _tInstance == null)
     {
         return;
     }
     EntityCtrl.AddEntity(_tInstance);
     _tInstance     = null;
     IsCreatingMode = false;
 }
예제 #4
0
    public void ClearGrid(bool destroy = false)
    {
        if (isEmpty)
        {
            return;
        }
        var e = entity;

        entity = null;
        if (destroy)
        {
            e.Destroy();
        }
    }
예제 #5
0
        public void RefreshData()
        {
            base.Clear();
            var entities = EntityCtrl.GetEntitys();

            if (entities != null && entities.Count > 0)
            {
                foreach (var entity in entities)
                {
                    if (_filter(entity))
                    {
                        base.Add(entity);
                    }
                }
            }
        }
예제 #6
0
 public GameManager()
 {
     _gameState  = EGameStatus.None;
     _entityCtrl = new EntityCtrl();
 }
예제 #7
0
 public bool UpdateEntity()
 {
     return(EntityCtrl.UpDataEntity());
 }