Example #1
0
 public CustomSystem()
 {
     if (_instance == null)
     {
         _instance = this;
     }
 }
Example #2
0
 public Engine(CustomSystem customSystem, ConsoleReaderWritter consoleReaderWriter,
               CommandExecuter commandExecuter)
 {
     this.CustomSystem         = customSystem;
     this.ConsoleReaderWritter = consoleReaderWriter;
     this.CommandExecuter      = commandExecuter;
 }
Example #3
0
    /* @brief: 注册表数据消息监听
     *    @param: iGameRecv 消息注册接口
     *    @return void
     */
    public static void RegistCallback(bool bClear = true)
    {
        if (bClear)
        {
            Clear();
        }

        //注册所有表
        CreateTables();

        //注册表自定义消息入口
        CustomSystem.RegistCustomCallback(CallbackDefine.SERVER_CUSTOMMSG_VIRTUALREC_ADD, onTableAdd);
        CustomSystem.RegistCustomCallback(CallbackDefine.SERVER_CUSTOMMSG_VIRTUALREC_CLEAR, onTableClear);
        CustomSystem.RegistCustomCallback(CallbackDefine.SERVER_CUSTOMMSG_VIRTUALREC_UPDATE, onTableChangeSingle);
        CustomSystem.RegistCustomCallback(CallbackDefine.SERVER_CUSTOMMSG_VIRTUALREC_UPDATE_ROW, onTableChange);
        CustomSystem.RegistCustomCallback(CallbackDefine.SERVER_CUSTOMMSG_VIRTUALREC_REMOVE_ROW, onTableDelete);
    }
Example #4
0
        public static void Main()
        {
            try
            {
                CustomSystem         customSystem        = new CustomSystem();
                ConsoleReaderWritter consoleReaderWriter = new ConsoleReaderWritter();
                CommandExecuter      commandExecuter     = new CommandExecuter(customSystem, consoleReaderWriter);

                Engine engine = new Engine(customSystem, consoleReaderWriter, commandExecuter);

                engine.Run();
            }
            catch (NullReferenceException nullRefEx)
            {
                Console.WriteLine(nullRefEx.Message);
            }
        }
Example #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);
    }
Example #6
0
 /// <summary>
 /// 清除各个子面板
 /// </summary>
 public void UnInitLobbyMainSystems()
 {
     WXLoginSystem.Destroy();
     RealNameApproveSystem.Destroy();
     LobbyMainSystem.Destroy();
     ShareWxSystem.Destroy();
     HolidayActivitySystem.Destroy();
     GetGiftSpreadBagSystem.Destroy();
     UserInfoSystem.Destroy();
     GamePlayingMethodSystem.Destroy();
     ProductAgencySystem.Destroy();
     CustomSystem.Destroy();
     PlayerMessageSystem.Destroy();
     ActivitySystem.Destroy();
     ActiveGiftSystem.Destroy();
     CreatRoomMessageSystem.Destroy();
     JoinRoomShowSystem.Destroy();
     InsteadOpenRoomSystem.Destroy();
     SelectAreaSystem.Destroy();
     HistroyGradeSystem.Destroy();
     ParlorShowSystem.Destroy();
     RedPageShowSystem.Destroy();
 }
Example #7
0
 /// <summary>
 /// 注册服务端消息
 /// </summary>
 void RegisterCallback()
 {
     CustomSystem.RegistCustomCallback(0, OnMonsterKilled);
 }