// Start is called before the first frame update void Start() { cpUI = GameObject.Find("ComponentPanel").GetComponent <ComponentUIPanel>(); try { distDisplay = GameObject.Find("LocalDistributionDisplay").GetComponent <DistributionUIDisplay>(); } catch { // do nothing } if (aura == null) { aura = GetComponent <Aura>(); } if (PlayerPrefs.HasKey("CachedSpell_e")) { cachedSpells.Add("e", new CachedSpell(PlayerPrefs.GetString("CachedSpell_e"))); } else { cachedSpells.Add("e", new CachedSpell("protect, self")); } if (PlayerPrefs.HasKey("CachedSpell_q")) { cachedSpells.Add("q", new CachedSpell(PlayerPrefs.GetString("CachedSpell_q"))); } else { cachedSpells.Add("q", new CachedSpell("self, protect, ordo")); } if (PlayerPrefs.HasKey("CachedSpell_1")) { cachedSpells.Add("1", new CachedSpell(PlayerPrefs.GetString("CachedSpell_1"))); } else { cachedSpells.Add("1", new CachedSpell("infernum, bolt")); } if (PlayerPrefs.HasKey("CachedSpell_2")) { cachedSpells.Add("2", new CachedSpell(PlayerPrefs.GetString("CachedSpell_2"))); } else { cachedSpells.Add("2", new CachedSpell("throw, self")); } if (PlayerPrefs.HasKey("CachedSpell_3")) { cachedSpells.Add("3", new CachedSpell(PlayerPrefs.GetString("CachedSpell_3"))); } else { cachedSpells.Add("3", new CachedSpell("mana, bolt")); } if (PlayerPrefs.HasKey("CachedSpell_r")) { cachedSpells.Add("r", new CachedSpell(PlayerPrefs.GetString("CachedSpell_r"))); } else { cachedSpells.Add("r", new CachedSpell("throw, infernum, expel")); } }