示例#1
0
        public async void StartWithPlayers(IEnumerable <Entity> players)
        {
            _messageLog.Add("Encounter Started...");

            var playersText = string.Join(",", players.Select(x => x.Name));

            _messageLog.Add($"Players are {playersText}");

            var enemiesText = string.Join(",", _enemies.Select(x => x.Name));

            _messageLog.Add($"Enemies are {enemiesText}");

            var allEntities = players.Concat(_enemies);

            _turnSystem.AddEntities(allEntities);

            await Task.Run(() => StartCombatLoopWithPlayers( players ));
        }
示例#2
0
 public void StartBattleWithPlayers(IEnumerable <Entity> players)
 {
     _messageLog.Add("Battle Started...");
     _encounter.LoadEnemies();
     _encounter.StartWithPlayers(players);
 }