Exemple #1
0
 }                                                /* <- creating a new config class */
 #endregion
 #region RegEvents
 /* registration of events(you can use any name) */
 private void RegisterEvents()
 {
     CustomConfig = new Config();
     CustomConfigs.Add(CustomConfig);                               /* <- Add and initialize the configuration */
     EventHandlers = new EventHandlers(this);                       /* <- class declaration with events */
     Qurre.Events.Round.Waiting += EventHandlers.WaitingForPlayers; /* <- method register */
     Qurre.Events.Player.Join   += EventHandlers.PlayerJoin;        /* <- method register */
 }
        public override void Enable()
        {
            CustomConfigs.Add(CustomConfig);
            if (!CustomConfig.IsEnabled)
            {
                return;
            }
            Singleton = this;
            handler   = new Handler(CustomConfig);

            ServerEvent.Start += handler.OnRoundStart;
        }