private void initQueues() { GameObject playerView = GetComponentInChildren <BattleView>(). gameObject.GetComponentInChildren <PlayerView>().gameObject; AbilityQueueView playerQueueView = playerView.GetComponentInChildren <AbilityQueueView>(); playerQueue = ScriptableObject.CreateInstance <PlayerQueue>(); playerQueue.init(playerQueueView, 3); GameObject enemyView = GetComponentInChildren <BattleView>(). gameObject.GetComponentInChildren <EnemyView>().gameObject; AbilityQueueView enemyQueueView = enemyView.GetComponentInChildren <AbilityQueueView>(); enemyQueue = ScriptableObject.CreateInstance <EnemyQueue>(); enemyQueue.init(enemyQueueView, 1); }
//Initialization Methods------------------------------------------------------------------------------------------------------------------------- /// <summary> /// Awake() is run when the script instance is being loaded, regardless of whether or not the script is enabled. /// Awake() runs before Start(). /// </summary> private void Awake() { abilityQueue = GetComponent <AbilityQueue>(); boss = GetComponent <Boss>(); }