Ejemplo n.º 1
0
        private static void VanillaRegistration()
        {
            Registry.gadgetRegistering  = -1;
            Registry.registeringVanilla = true;

            GameRegistry.RegisterRegistry(ItemRegistry.Singleton);
            GameRegistry.RegisterRegistry(ChipRegistry.Singleton);
            GameRegistry.RegisterRegistry(TileRegistry.Singleton);
            GameRegistry.RegisterRegistry(EntityRegistry.Singleton);
            GameRegistry.RegisterRegistry(MenuRegistry.Singleton);
            GameRegistry.RegisterRegistry(ObjectRegistry.Singleton);
            GameRegistry.RegisterRegistry(PlanetRegistry.Singleton);
            GameRegistry.RegisterRegistry(AllegianceRegistry.Singleton);
            GameRegistry.RegisterRegistry(AllegianceRegistry.Singleton);
            GameRegistry.RegisterRegistry(CharacterRaceRegistry.Singleton);
            GameRegistry.RegisterRegistry(CharacterAugmentRegistry.Singleton);
            GameRegistry.RegisterRegistry(CharacterUniformRegistry.Singleton);

            GadgetCoreAPI.MissingTexSprite = GadgetCoreAPI.AddTextureToSheet(GadgetCoreAPI.LoadTexture2D("missing_tex"));

            GameObject expCustom = Instantiate(Resources.Load <GameObject>("exp/exp7"));

            GadgetCoreAPI.AddCustomResource("exp/expCustom", expCustom);

            GadgetCoreAPI.AddCustomResource("mat/mRaceBack", new Material(Shader.Find("Unlit/Transparent"))
            {
                mainTexture = GadgetCoreAPI.LoadTexture2D("blank_race_select.png")
            });
            GadgetCoreAPI.AddCustomResource("mat/mRaceSlot", new Material(Shader.Find("Unlit/Transparent"))
            {
                mainTexture = GadgetCoreAPI.LoadTexture2D("blank_race_slot.png")
            });
            GadgetCoreAPI.AddCustomResource("mat/mUniformBack", new Material(Shader.Find("Unlit/Transparent"))
            {
                mainTexture = GadgetCoreAPI.LoadTexture2D("blank_uniform_select.png")
            });
            GadgetCoreAPI.AddCustomResource("mat/mUniformSlot", new Material(Shader.Find("Unlit/Transparent"))
            {
                mainTexture = GadgetCoreAPI.LoadTexture2D("blank_uniform_slot.png")
            });
            GadgetCoreAPI.AddCustomResource("mat/mAugmentBack", new Material(Shader.Find("Unlit/Transparent"))
            {
                mainTexture = GadgetCoreAPI.LoadTexture2D("blank_augment_select.png")
            });
            GadgetCoreAPI.AddCustomResource("mat/mAugmentSlot", new Material(Shader.Find("Unlit/Transparent"))
            {
                mainTexture = GadgetCoreAPI.LoadTexture2D("blank_augment_slot.png")
            });

            Registry.registeringVanilla = false;
        }
Ejemplo n.º 2
0
        private static void VanillaRegistration()
        {
            Registry.modRegistering     = -1;
            Registry.registeringVanilla = true;

            GameRegistry.RegisterRegistry(ItemRegistry.Singleton);
            GameRegistry.RegisterRegistry(ChipRegistry.Singleton);
            GameRegistry.RegisterRegistry(TileRegistry.Singleton);
            GameRegistry.RegisterRegistry(EntityRegistry.Singleton);
            GameRegistry.RegisterRegistry(MenuRegistry.Singleton);
            GameRegistry.RegisterRegistry(PlanetRegistry.Singleton);

            GadgetCoreAPI.MissingTexSprite = GadgetCoreAPI.AddTextureToSheet(GadgetCoreAPI.LoadTexture2D("missing_tex"));

            GameObject expCustom = Instantiate(Resources.Load <GameObject>("exp/exp7"));

            GadgetCoreAPI.AddCustomResource("exp/expCustom", expCustom);

            Registry.registeringVanilla = false;
        }