public void InitList(TeamRoster currentRoster) { foreach (MinionPoolGUIEntry entry in allEntries) { Destroy(entry.gameObject); } allEntries.Clear(); TeamPool pool = Core.GetPlayerProfile().pool; foreach (MinionTemplate template in Core.GetMinionTemplateManager().GetFullList()) { MinionPoolGUIEntry entry = Instantiate <MinionPoolGUIEntry>(prefab); entry.template = template; entry.icon.sprite = template.icon; entry.typeIcon.sprite = typeIcons [(int)template.GetSlotType()]; entry.typeBackground.sprite = typeBackgrounds [(int)template.GetSlotType()]; entry.transform.SetParent(contentBox); entry.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f); allEntries.Add(entry); } UpdateList(pool); ApplyFilters(Filters.instance); }
public void UpdateList(TeamPool pool) { foreach (MinionPoolGUIEntry entry in allEntries) { entry.SetAvailable(pool.unlocks.Contains(entry.template)); entry.SetNew(pool.IsNew(entry.template)); } }
/// <summary> /// used by TeamManager.cs -> MoveTeam to reset data /// </summary> /// <param name="pool"></param> public void ResetTeamData(TeamPool pool) { this.pool = pool; actorSlotID = -1; nodeID = -1; timer = -1; turnDeployed = -1; }
/// <summary> /// subMethod to set up a team's base data /// </summary> /// <param name="team"></param> private void InitialiseTeamData(int natoCount) { pool = TeamPool.Reserve; actorSlotID = -1; nodeID = -1; timer = -1; turnDeployed = -1; if (natoCount > -1 && natoCount < (int)NATO.Count) { teamName = "Team " + (NATO)natoCount; } else { teamName = "Team Unknown"; } }