Exemplo n.º 1
0
    void Start()
    {
        //連接SingleSelectSources
        singleSelectSourse = GetComponent <SingleSelectSources>();
        m_SceneSound       = singleSelectSourse.SceneSounds;
        m_EndingAnimObj    = singleSelectSourse.EndingAnimObjs;
        m_HeaderAnimObj    = singleSelectSourse.HeaderAnimObj;
        m_ClickItems       = singleSelectSourse.clickData;

        //遮罩關閉
        ImageMask.raycastTarget = false;
        //淡出相機
        m_CameraFade = this.gameObject.AddComponent <CameraFade>();
        //判斷播放背景音
        GamePublicAudioControl.Instance.PlaySceneMusic();
        //音量建大
        GamePublicAudioControl.Instance.UpSceneMusic();
        //判斷播放開頭提示音效
        PlaySceneSound(m_SceneSound.TipSound, m_SceneSound.TipSoundOnOff);

        //生成場景物件
        InstanceClickItem(m_ClickItems, ClickBtnPrefab);

        //點擊check按鈕事件
        GameEventSystem.Instance.OnPushCheckBtn += CheckPass;

        //生成結束動畫物件
        InstanceEndingAnimObj(m_EndingAnimObj);

        //生成開頭動畫物件
        InstanceHeaderAnimObj(m_HeaderAnimObj);
    }
Exemplo n.º 2
0
    private void OnEnable()
    {
        Instance = (SingleSelectSources)target;

        selector = new USceneSelector();
    }