Exemple #1
0
    private void initEnemyArea()
    {
        if (m_EnemyAreaPrefab != null)
        {
            GameObject enemy_area_object = GameObject.Instantiate(m_EnemyAreaPrefab);
            if (enemy_area_object != null)
            {
                enemy_area_object.transform.SetParent(m_CameraBattle.transform, false);
                m_BattleDispEnemy = enemy_area_object.GetComponent <BattleDispEnemy>();

                float      camera_fov = 0.0f;
                Quaternion camera_rot = Quaternion.identity;
                BattleSceneUtil.getAdjustScreenInfo(ref camera_fov, ref camera_rot);
                m_CameraBattle.fieldOfView             = camera_fov;
                m_CameraBattle.transform.localRotation = camera_rot;

                if (BattleTouchInput.HasInstance == false)
                {
                    BattleTouchInput battle_touch_input = gameObject.AddComponent <BattleTouchInput>();
                    battle_touch_input.setCamera(m_CameraBattle);
                }
                m_BattleDispEnemy.init(m_CameraBattle, transform.parent.GetComponent <Canvas>());
            }
        }
    }
    // Unity関数.
    protected override void Awake()
    {
        base.Awake();
        BattleTouchInput battle_touch_input = GetComponent <BattleTouchInput>();

        if (battle_touch_input != null)
        {
            battle_touch_input.setCamera(m_BattleCameraNear);
        }

        m_EnemyArea.GetComponent <BattleDispEnemy>().init(m_BattleCameraNear, m_UICanvas.GetComponent <Canvas>());

        m_BattleLogic = GetComponent <BattleLogic>();
        m_BattleLogic.init(
            m_BattleCardArea.GetComponent <BattleCardArea>().m_BattleCardManager,
            m_SkillIconArea.GetComponent <SkillIconArea>(),
            m_CountDownArea.GetComponent <CountDownArea>(),
            m_CountFinishArea.GetComponent <CountFinishArea>(),
            m_CaptionArea.GetComponent <BattleCaptionControl>(),
            m_TextCutinArea.GetComponent <TextCutinViewControl>(),
            m_EnemyArea.GetComponent <BattleDispEnemy>(),
            m_ComboArea.GetComponent <BattleComboArea>(),
            m_ComboFinishArea.GetComponent <BattleComboFinishArea>(),
            m_PlayerPartyView.GetComponent <BattlePlayerPartyViewControl>()
            );

        m_BattleTutorialManager = new BattleTutorialManager();

        m_BattleAutoPlay.init(m_BattleCardArea.GetComponent <BattleCardArea>().m_BattleCardManager);
    }