public void Init(RuneDescriptor rune, MagicMaker magicMaker) { _magicMaker = magicMaker; _startParent = transform.parent; Rune = rune; Image.sprite = Rune.Image; }
private Rune r(RuneDescriptor desc) { int y = count % width; int x = count / width; GameObject runeObject = (GameObject)Instantiate (runePrefab, new Vector3 (x, y, 0), Quaternion.identity); Rune rune = runeObject.GetComponent<Rune> (); //rune.init (this, x, y, desc); count++; return rune; }
private void Init() { ScrollPrefab.SetActive(false); RunePrefab.SetActive(false); ScrollReserchSlot.Init(this); foreach (var runeRef in Runes) { RuneDescriptor rune = Instantiate(runeRef); _myRunes.Add(rune); } foreach (var spellRef in Spells) { SpellDescriptor spell = Instantiate(spellRef); _mySpells.Add(spell); } foreach (var rSlot in RuneSlots) { rSlot.Init(this); } }