private void Awake() { //DontDestroyOnLoad(gameObject); if (instance != null) { Destroy(gameObject); return; } instance = this; avaPool = AvaPool.instance; }
private void Awake() { if (instance != null) { Destroy(gameObject); return; } instance = this; DontDestroyOnLoad(this); avaPool = AvaPool.instance; eqpAvaPool = EqpAvaPool.instance; foreach (Enemy enemy in enemies.GetComponentsInChildren <Enemy>()) { enemy.OnEnemyDead += OnChangeRewardRune; enemy.OnEnemyDead += OnChangeRewardEqp; } }
void Awake() { if (instance != null) { Destroy(gameObject); return; } instance = this; totalPool = TotalPool.instance; foreach (Rune rune in totalPool.totalPool) { if (rune.collection == "Base" || rune.collection == "Unlock") { avaPool.Add(rune); } } //Debug.Log(avapool.Runes[0].name); //Debug.Log(avapool.Runes.Count); }