コード例 #1
0
ファイル: Main.cs プロジェクト: Olink/Twitchy-s-Housing-Mod
        public override void Initialize()
        {
            HTools.SetupConfig();

            GameHooks.Initialize += OnInitialize;
            GameHooks.Update     += OnUpdate;
            ServerHooks.Chat     += OnChat;
            NetHooks.GreetPlayer += OnGreetPlayer;
            ServerHooks.Leave    += OnLeave;
            NetHooks.GetData     += GetData;

            GetDataHandlers.InitGetDataHandler();
        }
コード例 #2
0
        public override void Initialize()
        {
            HConfigFile.ForceLoad();

            ServerApi.Hooks.GameInitialize.Register(this, OnInitialize, -5);
            ServerApi.Hooks.ServerChat.Register(this, OnChat, 5);
            ServerApi.Hooks.NetGreetPlayer.Register(this, OnGreetPlayer, -5);
            ServerApi.Hooks.ServerLeave.Register(this, OnLeave, 5);
            ServerApi.Hooks.NetGetData.Register(this, GetData, 10);
            ServerApi.Hooks.GamePostInitialize.Register(this, PostInitialize, -5);
            GetDataHandlers.InitGetDataHandler();
            if (!HConfig.DisableUpdateTimer)
            {
                Update.Elapsed += OnUpdate;
                Update.Start();
                URunning = true;
            }
        }