コード例 #1
0
 public override void OnDisable()
 {
     if (!Config.GetBool("floating_items", true))
     {
         return;
     }
     inst.UnpatchAll();
     inst = null;
     Events.ItemDroppedEvent    -= PLEV.ItemDropped;
     Events.RoundStartEvent     -= PLEV.RoundStart;
     Events.ConsoleCommandEvent -= PLEV.PlayerCmd;
     Events.ShootEvent          -= PLEV.PlayerShoot;
     PLEV = null;
 }
コード例 #2
0
 public override void OnEnable()
 {
     if (!Config.GetBool("floating_items", true))
     {
         return;
     }
     ReloadConfig();
     inst = HarmonyInstance.Create("virtualbrightplayz.exiledfloatingitems");
     inst.PatchAll();
     PLEV = new FIEvents();
     Events.ItemDroppedEvent    += PLEV.ItemDropped;
     Events.RoundStartEvent     += PLEV.RoundStart;
     Events.ConsoleCommandEvent += PLEV.PlayerCmd;
     Events.ShootEvent          += PLEV.PlayerShoot;
 }