예제 #1
0
        private bool onSubDoneResult(byte[] data, int size)
        {
            CMD_GP_CheckInResult pNetInfo = (CMD_GP_CheckInResult)StructConverterByteArray.BytesToStruct(data, typeof(CMD_GP_CheckInResult));
            ///CMD_GP_CheckInResult* pNetInfo = (CMD_GP_CheckInResult*)data;

            string strLog = GlobalUserInfo.GBToUtf8(pNetInfo.szNotifyContent);

            Debug.Log("CGPSignInMission::onSubDoneResult:" + strLog);
            GameSceneUIHandler.ShowLog(strLog);

            GlobalUserInfo    pGlobalUserInfo = GlobalUserInfo.GetInstance();
            tagGlobalUserData pGlobalUserData = pGlobalUserInfo.GetGlobalUserData();

            if (pNetInfo.bSuccessed != 0)
            {
                //Success

                if (pNetInfo.bType == 0)
                {
                    //签到结果返回

                    pGlobalUserData.wSeriesDate = pNetInfo.wSeriesDate;
                    award();
                }
                else
                {
                    Loom.QueueOnMainThread(() => { HNGameManager.GetInstance.PlaySoundEffect(-1, (int)AudioManager.Sound_Effect_Defines.SOUND_SIGNGIN_AWARED); });
                }

                pGlobalUserData.lUserInsure = pNetInfo.lScore;
                pGlobalUserInfo.upPlayerInfo();
                //刷新UI
                Loom.QueueOnMainThread(() =>
                {
                    if (CreateOrJoinRoom.GetInstance != null)
                    {
                        CreateOrJoinRoom.GetInstance.UpdateInfo();
                    }
                });
            }
            else
            {
                stop();
            }

            if (pNetInfo.bType == 0)
            {
                //签到结果返回
            }
            else
            {
                //签到奖励返回

                stop();
            }

            if (mIGPSignInMissionSink != null)
            {
                mIGPSignInMissionSink.onSignInDoneResult(pNetInfo);
            }

            return(true);
        }
예제 #2
0
 public virtual void onSignInDoneResult(CMD_GP_CheckInResult pNetInfo)
 {
 }