10 public void AssignUID(
Faction s)
12 Faction faction = this.dictAll.TryGetValue(s.id,
null);
15 Debug.LogError(
"exception: Faction id already exists:" + faction.id);
18 this.dictAll.Add(s.uid, s);
22 public void OnCreateGame()
28 this.Home = this.Find(
"home");
30 this.Wilds = this.Find(
"wilds");
31 this.Fighter = this.Find<GuildFighter>(
"guild_fighter");
32 this.Mage = this.Find<GuildMage>(
"guild_mage");
33 this.Thief = this.Find<GuildThief>(
"guild_thief");
34 this.Merchant = this.Find<GuildMerchant>(
"guild_merchant");
40 foreach (
Faction faction
in this.dictAll.Values)
47 public T Find<T>(
string id) where T :
Faction
49 return this.Find(
id) as T;
55 foreach (
Faction faction
in this.dictAll.Values)
67 public Dictionary<string, Faction> dictAll =
new Dictionary<string, Faction>();