private GameObject CreateSpellPooled(SpellType type, GameObject original, Vector3 position) { SpellPool pool; if (!spellPools.TryGetValue(type, out pool)) { pool = new SpellPool(); pool.Original = original; spellPools[type] = pool; } var go = pool.Get(); go.GetComponentInChildren <SpellScript>().InitPositions(position); return(go); }
public void SetAllSystems() { m_SpellPool = GameObject.Find("_System").GetComponent <SpellPool>(); m_SpellPool.SetSpells(); }
void Start() { m_PlayerFaction = PlayerFactionEnum.Yagra; m_SpellPool = GameObject.Find("_System").GetComponent <SpellPool>(); m_SpellPool.SetSpells(); }
// Use this for initialization void Awake() { instance = this; }
private void Awake() { Instance = GetComponent <SpellPool>(); }
void Start() { m_SpellPool = GetComponent <SpellPool>(); m_SpellSpawner = GetComponent <SpellSpawner>(); }