public void UpdateAiCooperData() { for (int i = 0; i < fightRoles.Length; i++) { RoleBase role = fightRoles[i]; if (role != null) { int cooperId = role.GetCooperId(); int proId = role.GetProId(); if (!etls.ContainsKey(cooperId)) { etls.Add(cooperId, new Cooperation(cooperId)); } if (!etls.ContainsKey(proId)) { etls.Add(proId, Profession.CreatePro(proId)); } } } foreach (var v in etls) { v.Value.Update(fightRoles); } }
public Profession GetPlayerPro(int id) { if (!playerEtgs.ContainsKey(id)) { playerEtgs.Add(id, Profession.CreatePro(id)); } return(playerEtgs[id] as Profession); }