示例#1
0
        public void Execute()
        {
            foreach (var gameEntity in _zombieGroup)
            {
                if (!(gameEntity.calldown.Value < 0.001f) || !(gameEntity.zombieTimer.Value < 0.001f))
                {
                    continue;
                }
                gameEntity.target.Entity.isDestroy = true;
                Object.Destroy(gameEntity.target.Entity.view.Value);

                _monsterFactory.CreateSkeleton(_grid.WorldToCell(gameEntity.target.Entity.view.Value.transform.position));

                gameEntity.ReplaceCalldown(gameEntity.initialCalldown.Value);
                gameEntity.ReplaceZombieTimer(3);
            }
        }