Ejemplo n.º 1
0
    private void SendEnterStageRequest(object obj)
    {
        EnterSceneActionParam param = new EnterSceneActionParam();

        param.scenetype = SceneType.SceneType_Stage;
        param.sceneid   = (int)obj;
        Net.Instance.DoAction((int)Message.MESSAGE_ID.ID_MSG_SCENE_ENTER, param);
    }
Ejemplo n.º 2
0
    protected override void OnRequest(request_msg_enterstage request, object userdata)
    {
        EnterSceneActionParam param = userdata as EnterSceneActionParam;

        if (param == null)
        {
            return;
        }

        request.scene_type = (uint)param.scenetype;
        request.scene_id   = (uint)param.sceneid;
    }
Ejemplo n.º 3
0
 protected override void OnRespond(respond_msg_enterstage respond, object userdata)
 {
     if (respond.result == (uint)ERROR_CODE.ERR_SCENE_ENTER_OK)
     {
         EnterSceneActionParam param = userdata as EnterSceneActionParam;
         if (param == null)
         {
             return;
         }
         if (param.scenetype == SceneType.SceneType_City)
         {
             SceneManager.Instance.EnterScene((int)respond.scene_id);
         }
         else
         {
             StageDataManager.Instance.CacheServerAward(respond.awards);
             SceneManager.Instance.EnterScene((int)respond.scene_id);
         }
     }
     else
     {
         StageDataManager.Instance.PrintErrorCode((ERROR_CODE)(respond.result));
     }
 }