Beispiel #1
0
        public override IEnumerator UpdateView(FightStatus fightStatus)
        {
            int      positionCount = positions.Count;
            FightMap current       = FightMap.current;

            if (null != current)
            {
                IEnumerator[] array = new IEnumerator[positionCount];
                if (addWarning)
                {
                    for (int i = 0; i < positionCount; i++)
                    {
                        CellCoord cellCoord = positions[i];
                        Direction direction = (Direction)directions[i];
                        array[i] = current.AddMonsterSpawnCell(cellCoord.X, cellCoord.Y, direction);
                    }
                }
                else
                {
                    for (int j = 0; j < positionCount; j++)
                    {
                        CellCoord cellCoord2 = positions[j];
                        array[j] = current.RemoveMonsterSpawnCell(cellCoord2.X, cellCoord2.Y);
                    }
                }
                yield return(EnumeratorUtility.ParallelRecursiveImmediateSafeExecution(array));
            }
            for (int k = 0; k < positionCount; k++)
            {
                Vector2Int       position = (Vector2Int)positions[k];
                ICharacterObject characterObject;
                if (fightStatus.TryGetEntityAt(position, out ICharacterEntity character) && (characterObject = (character.view as ICharacterObject)) != null)
                {
                    characterObject.CheckParentCellIndicator();
                }
            }
        }