示例#1
0
文件: Utils.cs 项目: notten/REY-Mod
 public static void Initialize()
 {
     if (timer != null)
     {
         timer.Dispose();                // dispose the old timer if theres already one
     }
     timer = new Timer
     {
         AutoReset = true,
         Interval  = 60000 // once per minute
     };
     timer.Elapsed += (x, y) => OneMinuteEvent.Invoke();
     timer.Start();
     UserManager.OnUserLoggedIn.Remove(OnUserLogin);
     UserManager.OnUserLoggedIn.Add(OnUserLogin);
 }
示例#2
0
        public static void Initialize()
        {
            REYmodSettings.OnSendMessageToggleChange.Add(ServerGUIBroadcast);


            if (timer != null)
            {
                timer.Dispose();                // dispose the old timer if theres already one
            }
            timer = new Timer
            {
                AutoReset = true,
                Interval  = 60000 // once per minute
            };
            timer.Elapsed += (x, y) => OneMinuteEvent.Invoke();
            timer.Start();
            UserManager.OnUserLoggedIn.Remove(OnUserLogin);
            UserManager.OnUserLoggedIn.Add(OnUserLogin);
        }
示例#3
0
文件: Utils.cs 项目: notten/REY-Mod
 /// <summary>
 /// This method is called whenever a player eats somethin
 /// </summary>
 /// <param name="food">the eaten fooditem</param>
 /// <param name="user">the player who ate</param>
 private static void PlayerEatFood(FoodItem food, User user)
 {
     OnPlayerEatFood.Invoke(food, user);
     //ChatManager.ServerMessageToAllAlreadyLocalized(user.UILink() + " just ate " + food.UILink(), false);
 }
示例#4
0
文件: Config.cs 项目: Ekkelus/REY-Mod
 private void _onSendMessageToggleChange()
 {
     OnSendMessageToggleChange.Invoke();
 }
示例#5
0
文件: Config.cs 项目: Ekkelus/REY-Mod
 private void _onSeedDropChange()
 {
     OnSeedDropChange.Invoke(Config.SeedDropMultiplier);
 }
示例#6
0
文件: Config.cs 项目: Ekkelus/REY-Mod
 private void _onPlantYieldChange()
 {
     OnPlantYieldChange.Invoke(Config.PlantYieldMultiplier);
 }