コード例 #1
0
        public void Setup()
        {
            Instance = this;

            comms = new CommunicationNode();
            comms.EnableNode(this);
        }
コード例 #2
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);

            //Must manually set these for them to show up in the config file
            //I know this looks super wonky but it's the current best way to handle this
            GlobalSettings.GatheringSwarmChanges = GlobalSettings.GatheringSwarmChanges;
            GlobalSettings.WaywardCompassChanges = GlobalSettings.WaywardCompassChanges;
            GlobalSettings.HeavyBlowChanges      = GlobalSettings.HeavyBlowChanges;

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

            SetupDefaulSettings();

            UnRegisterCallbacks();
            RegisterCallbacks();

            Log(this.GetType().Name + " is done initializing!");
        }
コード例 #3
0
        public void Setup()
        {
            Dev.Where();

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

            UnityEngine.SceneManagement.SceneManager.sceneLoaded -= SceneLoaded;
            UnityEngine.SceneManagement.SceneManager.sceneLoaded += SceneLoaded;

            Dev.Log("Menu Loaded!");
        }
コード例 #4
0
        public override void Initialize()
        {
            if (Instance != null)
            {
                Log("Warning: EnemyRandomizer is a singleton. Trying to create more than one may cause issues!");
                return;
            }

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

            Log("Enemy Randomizer Mod initializing!");

            SetupDefaulSettings();

            UnRegisterCallbacks();
            RegisterCallbacks();

            //create the database that will hold all the loaded enemies
            if (database == null)
            {
                database = new EnemyRandomizerDatabase();
            }

            if (logic == null)
            {
                logic = new EnemyRandomizerLogic(database);
            }

            //create the loader which will handle loading all the enemy types in the game
            if (loader == null)
            {
                loader = new EnemyRandomizerLoader(database);
            }

            //Create all mod UI elements and their manager
            if (menu == null)
            {
                menu = new Menu.RandomizerMenu();
            }

            database.Setup();
            loader.Setup();
            menu.Setup();

            ContractorManager.Instance.StartCoroutine(DebugInput());
        }
コード例 #5
0
ファイル: BoopSoundMod.cs プロジェクト: Kerr1291/BoopSoundMod
        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();
        }