コード例 #1
0
ファイル: BattleManager.cs プロジェクト: Jacob-Geb/Down
        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);
        }
コード例 #2
0
    //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>();
    }