Пример #1
0
        public virtual async Task <ActionResult> Create(Group model)
        {
            try
            {
                // TODO: Add insert logic here
                await GroupCore.CreateAsync(model);

                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                return(View());
            }
        }
Пример #2
0
        private static NavMeshAgent[] GetNavMeshAgents(GroupCore units, uint[] moveCommandUnits)
        {
            var result = new List <NavMeshAgent>();

            foreach (var entity in units)
            {
                if (moveCommandUnits.Contains(entity.Get <UnitComponent>().unitId))
                {
                    result.Add(entity.transform.GetComponent <NavMeshAgent>());
                }
            }

            return(result.ToArray());
        }
Пример #3
0
        public virtual async Task <ActionResult> Delete(Guid id, Group model)
        {
            try
            {
                // TODO: Add delete logic here
                await GroupCore.GetAsync(id);

                await GroupCore.DeleteAsync(model);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
Пример #4
0
        // GET: Group/Delete/5
        public virtual async Task <ActionResult> Delete(Guid id)
        {
            var std = await GroupCore.GetAsync(id);

            return(View(std));
        }
Пример #5
0
        // GET: Group
        public virtual async Task <ActionResult> Index()
        {
            var groups = await GroupCore.GetAllAsync().ConfigureAwait(false);

            return(View(groups));
        }
Пример #6
0
 public void Dispose()
 {
     g = null;
 }
Пример #7
0
 internal Enumerator(GroupCore g)
 {
     position = -1;
     this.g   = g;
 }