示例#1
0
        public override void Initialize()
        {
            if (Instance != null)
            {
                Log("Warning: " + this.GetType().Name + " is a singleton. Trying to create more than one may cause issues!");
                return;
            }

            Instance = this;
            comms    = new CommunicationNode();
            comms.EnableNode(this);

            Log(this.GetType().Name + " initializing!");

            SetupDefaulSettings();

            UnRegisterCallbacks();
            RegisterCallbacks();
        }
示例#2
0
 ///Revert all changes the mod has made
 public void Unload()
 {
     UnRegisterCallbacks();
     comms.DisableNode();
     Instance = null;
 }