示例#1
0
    /* @brief: 启动注册自定义消息监听
     *  @param: iGameRecv 消息注册接口
     *  @return void
     */
    public static void RegistCallback(IGameReceiver iGameRecv, bool bClear = true)
    {
        if (bClear)
        {
            Clear();
        }

        iGameRecv.RegistCallBack("on_entry_scene", on_entry_scene);
        iGameRecv.RegistCallBack("on_exit_scene", on_exit_scene);
        iGameRecv.RegistCallBack("on_scene_property", on_scene_property);
    }
示例#2
0
    /* @brief: 启动注册自定义消息监听
     *   @param: iGameRecv 消息注册接口
     *   @return void
     */
    public static void RegistCallback(IGameReceiver iGameRecv, bool bClear = true)
    {
        if (bClear)
        {
            mCustoms.Clear();
        }

        iGameRecv.RegistCallBack("on_custom", CustomSystem.on_custom);
    }
示例#3
0
    /*
     *  @brief: 启动注册自定义消息监听
     *  @param: iGameRecv 消息注册接口
     *  @return void
     */
    public static void RegistCallback(IGameReceiver iGameRecv, bool bClear = true)
    {
        if (bClear)
        {
            Clear();
        }

        iGameRecv.RegistCallBack("on_property_table", on_property_table);
        iGameRecv.RegistCallBack("on_add_object", on_add_object);
        iGameRecv.RegistCallBack("on_object_property", on_object_property);
        iGameRecv.RegistCallBack("on_all_prop", on_all_prop);
        iGameRecv.RegistCallBack("on_object_property_change", on_object_property_change);
        iGameRecv.RegistCallBack("on_remove_object", on_remove_object);
        iGameRecv.RegistCallBack("on_before_remove_object", on_before_remove_object);

        //移动管理
        iGameRecv.RegistCallBack("on_moving", on_moving);
        iGameRecv.RegistCallBack("on_location", on_location);
        iGameRecv.RegistCallBack("on_all_dest", on_all_dest);
    }
示例#4
0
    public static bool loginStatus = false;                      //是否登录成功/

    /* @brief:系统启动注册事件
     *  @return void
     */
    public static void RegistCallback(bool bClear = true)
    {
        IGameReceiver iGameRecv = Game.Instance.mGameRecv;

        if (iGameRecv == null)
        {
            LogSystem.Log("Error!! LoginStage::RegistCallback iGameRecv is null");
            return;
        }

        miErrorCode = 0;

        //登录账号后服务器爆满排队回调
        iGameRecv.RegistCallBack("on_queue", on_queue);

        //绑定计费串
        iGameRecv.RegistCallBack("on_charge_validstring", on_charger_validstring);

        //登录服务器失败,返回错误码回调
        iGameRecv.RegistCallBack("on_error_code", on_error_code);

        //登录成功,新建角色,删除角色, 恢复角色后回调, 如果是登录成功,不一定有,比如顶账号
        iGameRecv.RegistCallBack("on_login_succeed", on_login_succeed);

        ///收到验证消息
        iGameRecv.RegistCallBack("on_set_encode", on_set_encode);

        ///接收到服务器消息版本信息
        iGameRecv.RegistCallBack("on_server_msg_version", on_server_msg_version);
    }
示例#5
0
    /* @brief:系统启动注册事件
     *   @return void
     */
    public static void RegistCallback(bool bClear = true)
    {
        IGameReceiver iGameRecv = Game.Instance.mGameRecv;

        if (iGameRecv == null)
        {
            LogSystem.Log("Error!! WorldStage::RegistCallback iGameRecv is null");
            return;
        }

        GameSceneManager.RegistCallback(iGameRecv, bClear);
        ObjectManager.RegistCallback(iGameRecv, bClear);
        RecordSystem.RegistCallback(iGameRecv, bClear);
        CustomSystem.RegistCallback(iGameRecv, bClear);
        ViewSystem.RegistCallback(iGameRecv, bClear);

        TableSystem.RegistCallback();
        ServerCustom.RegistCallBack();

        iGameRecv.RegistCallBack("on_msg_tracert", on_msg_tracert);
        iGameRecv.RegistCallBack("on_terminate", on_terminate);
    }
示例#6
0
    /* @brief: 启动注册自定义消息监听
     *  @param: iGameRecv 消息注册接口
     *  @return void
     */
    public static void RegistCallback(IGameReceiver iGameRecv, bool bClear = true)
    {
        if (bClear)
        {
            Clear();
        }

        iGameRecv.RegistCallBack("on_create_view", on_create_view);
        iGameRecv.RegistCallBack("on_delete_view", on_delete_view);
        iGameRecv.RegistCallBack("on_view_property", on_view_property);
        iGameRecv.RegistCallBack("on_view_add", on_view_add);
        iGameRecv.RegistCallBack("on_view_remove", on_view_remove);
        iGameRecv.RegistCallBack("on_view_object_property", on_view_object_property);
        iGameRecv.RegistCallBack("on_view_object_property_change", on_view_object_property_change);
    }
示例#7
0
 /* @brief: 启动注册自定义消息监听
  *   @param: iGameRecv 消息注册接口
  *   @return void
  */
 public void RegistCallback(IGameReceiver iGameRecv)
 {
     iGameRecv.RegistCallBack("on_custom", on_custom);
 }
示例#8
0
    /* @brief: 注册表数据消息监听
     *    @param: iGameRecv 消息注册接口
     *    @return void
     */
    public static void RegistCallback(IGameReceiver iGameRecv, bool bClear = true)
    {
        ///清空所有之前监听的对象
        if (bClear)
        {
            Clear();
        }

        Init();

        iGameRecv.RegistCallBack("on_record_table", on_record_table);
        ///主角可视表回调
        iGameRecv.RegistCallBack("on_record_add_row", on_record_add_row);
        iGameRecv.RegistCallBack("on_record_remove_row", on_record_remove_row);
        iGameRecv.RegistCallBack("on_record_grid", on_record_grid);
        iGameRecv.RegistCallBack("on_record_single_grid", on_record_single_grid);
        iGameRecv.RegistCallBack("on_record_clear", on_record_clear);

        ///视窗回调
        iGameRecv.RegistCallBack("on_view_record_add_row", on_view_record_add_row);
        iGameRecv.RegistCallBack("on_view_record_remove_row", on_view_record_remove_row);
        iGameRecv.RegistCallBack("on_view_record_grid", on_view_record_grid);
        iGameRecv.RegistCallBack("on_view_record_single_grid", on_view_record_single_grid);
        iGameRecv.RegistCallBack("on_view_record_clear", on_view_record_clear);

        ///视窗对象可视表回调
        iGameRecv.RegistCallBack("on_viewobj_record_add_row", on_viewobj_record_add_row);
        iGameRecv.RegistCallBack("on_viewobj_record_remove_row", on_viewobj_record_remove_row);
        iGameRecv.RegistCallBack("on_viewobj_record_grid", on_viewobj_record_grid);
        iGameRecv.RegistCallBack("on_viewobj_record_single_grid", on_viewobj_record_single_grid);
        iGameRecv.RegistCallBack("on_viewobj_record_clear", on_viewobj_record_clear);

        ///场景可视表回调
        iGameRecv.RegistCallBack("on_scene_record_add_row", on_scene_record_add_row);
        iGameRecv.RegistCallBack("on_scene_record_remove_row", on_scene_record_remove_row);
        iGameRecv.RegistCallBack("on_scene_record_grid", on_scene_record_grid);
        iGameRecv.RegistCallBack("on_scene_record_single_grid", on_scene_record_single_grid);
        iGameRecv.RegistCallBack("on_scene_record_clear", on_scene_record_clear);
    }