Esempio n. 1
0
    private void OnBoxClick(GameObject go)
    {
        GTAudioManager.Instance.PlayEffectAudio(GTAudioKey.SOUND_UI_CLICK);
        int index           = go.name.ToInt32() - 1;
        DCopyMainChapter db = ReadCfgCopyMainChapter.GetDataById(chapter);

        GTWindowManager.Instance.OpenWindow(EWindowID.UIAwardBox);
        UIAwardBox   window = (UIAwardBox)GTWindowManager.Instance.GetWindow(EWindowID.UIAwardBox);
        ERewardState state  = MLRaid.Instance.GetChapterRewardStateByAwardIndex(chapter, index);

        UIEventListener.VoidDelegate doReceive = delegate(GameObject w)
        {
            GTNetworkSend.Instance.TryMainCopyReceiveReward(chapter, index);
        };
        window.ShowAwardById(db.Awards[index], state, doReceive);
    }
Esempio n. 2
0
    private void OnBoxClick(GameObject go)
    {
        GTAudioManager.Instance.PlayEffectAudio(GTAudioKey.SOUND_UI_CLICK);
        int    index = go.name.ToInt32() - 1;
        DWorld db    = ReadCfgWorld.GetDataById(mChapter);

        GTWindowManager.Instance.OpenWindow(EWindowID.UIAwardBox);
        UIAwardBox window = (UIAwardBox)GTWindowManager.Instance.GetWindow(EWindowID.UIAwardBox);
        int        state  = RaidModule.Instance.GetChapterRewardStateByAwardIndex(mChapter, index);

        UIEventListener.VoidDelegate doReceive = delegate(GameObject w)
        {
            RaidService.Instance.TryReceiveReward(mCurCopyType, mChapter, index);
        };
        window.ShowAwardById(db.Awards[index], state, doReceive);
    }