コード例 #1
0
        private async void CreateStage()
        {
            Reset();

            foreach (var character in _loadCharacter.LoadCharacters())
            {
                _characters.Add(_characterFactory.Create(_id, character, Owner.Player));
                _id++;
            }

            await UniTask.WaitWhile(() => _residueCharacters.Characters().Any());

            _residueCharacters.Initialize();

            foreach (var character in _loadCharacter.LoadEnemies())
            {
                _characters.Add(_characterFactory.Create(_id, character, Owner.CPU));
                _id++;
            }

            await UniTask.WaitWhile(() => _residueEnemies.Enemies().Any());

            _residueEnemies.Initialize();

            _bufferInitializer.UpdateCharacters(_residueCharacters.Characters().Concat(_residueEnemies.Enemies()));

            var stage = _stageInitializer.NextStage(_loadStage.LoadStage(), _residueCharacters.Characters().ToList(),
                                                    _residueEnemies.Enemies().ToList());

            foreach (var panel in stage)
            {
                _dice.Add(_diceFactory.Create(panel.GetEntity()));
                var entity = panel.GetEntity();
                if (entity.PanelState == PanelState.NoEntry)
                {
                    continue;
                }
                _panel.Add(_panelFactory.Create(entity));
            }

            _phaseRegister.NextTurn();
        }
コード例 #2
0
 public override ICharacter Create()
 {
     return(_factory.Create(_requirements));
 }