using System.Collections.Generic; using UnityEngine; public class TeamManager : GameSystemManager { protected Dictionary teamDict = new Dictionary(); public override void Init() { base.Init(); } public override void Release() { base.Release(); } public TeamBase GetTeam(TeamType teamType) { TeamBase team = null; if (!teamDict.TryGetValue(teamType, out team)) { team = GetStoryTeam(); teamDict.Add(teamType, team); } return team; } public TeamBase GetStoryTeam() { TeamBase team = null; if (!teamDict.TryGetValue(TeamType.Story, out team)) { team = new TeamBase(); team.AddTeamHeros(HeroManager.Instance.GetPowerfulHeroList()); teamDict.Add(TeamType.Story, team); } return team; } }