Ejemplo n.º 1
0
        public static ModHotKey RegisterHotKey(Mod mod, string name, string defaultKey)
        {
            string key = mod.Name + ": " + name;

            modHotKeys[key] = new ModHotKey(mod, name, defaultKey);
            return(modHotKeys[key]);
        }
Ejemplo n.º 2
0
 public override void Load()
 {
     // this makes sure that the UI doesn't get opened on the server
     // the server can't see UI, can it? it's just a command prompt
     if (!Main.dedServ)
     {
         evasionUI = new EvasionUI();
         evasionUI.Initialize();
         evasionInterface = new UserInterface();
         evasionInterface.SetState(evasionUI);
     }
     NinjaEvasion  = RegisterHotKey("Ninja Evasion", "Q");
     instance      = this;
     thoriumLoaded = ModLoader.GetMod("ThoriumMod") != null;
 }
Ejemplo n.º 3
0
 public static ModHotKey RegisterHotKey(Mod mod, string name, string defaultKey)
 {
     modHotKeys[name] = new ModHotKey(mod, name, defaultKey);
     return(modHotKeys[name]);
 }
Ejemplo n.º 4
0
 public override void Load()
 {
     for (int k = 1; k <= 4; k++)
     {
         AddBossHeadTexture(captiveElementHead + k);
         AddBossHeadTexture(captiveElement2Head + k);
     }
     RandomBuffHotKey = RegisterHotKey("Random Buff", "P");
     FaceCustomCurrencyID = CustomCurrencyManager.RegisterCurrency(new ExampleCustomCurrency(ItemType<Items.Face>(), 999L));
     if (!Main.dedServ)
     {
         AddEquipTexture(null, EquipType.Legs, "ExampleRobe_Legs", "ExampleMod/Items/Armor/ExampleRobe_Legs");
         //Main.music[MusicID.Dungeon].ModMusic = GetSound("Sounds/Music/ExampleMusic").CreateInstance();
         AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/DriveMusic"), ItemType("ExampleMusicBox"), TileType("ExampleMusicBox"));
         Main.instance.LoadTiles(TileID.Loom);
         Main.tileTexture[TileID.Loom] = GetTexture("Tiles/AnimatedLoom");
         // What if....Replace a vanilla item texture and equip texture.
         //Main.itemTexture[ItemID.CopperHelmet] = GetTexture("Resprite/CopperHelmet_Item");
         //Item copperHelmet = new Item();
         //copperHelmet.SetDefaults(ItemID.CopperHelmet);
         //Main.armorHeadLoaded[copperHelmet.headSlot] = true;
         //Main.armorHeadTexture[copperHelmet.headSlot] = GetTexture("Resprite/CopperHelmet_Head");
         Filters.Scene["ExampleMod:PuritySpirit"] = new Filter(new PuritySpiritScreenShaderData("FilterMiniTower").UseColor(0.4f, 0.9f, 0.4f).UseOpacity(0.7f), EffectPriority.VeryHigh);
         SkyManager.Instance["ExampleMod:PuritySpirit"] = new PuritySpiritSky();
         Filters.Scene["ExampleMod:MonolithVoid"] = new Filter(new ScreenShaderData("FilterMoonLord"), EffectPriority.Medium);
         SkyManager.Instance["ExampleMod:MonolithVoid"] = new VoidSky();
         exampleFont = GetFont("Fonts/ExampleFont");
         exampleUI = new ExampleUI();
         exampleUI.Activate();
         exampleUserInterface = new UserInterface();
         exampleUserInterface.SetState(exampleUI);
     }
 }
Ejemplo n.º 5
0
 public override void Unload()
 {
     NinjaEvasion = null;
     instance     = null;
 }
Ejemplo n.º 6
0
 internal static ModHotKey RegisterHotKey(ModHotKey hotkey)
 {
     modHotKeys[hotkey.uniqueName] = hotkey;
     return(hotkey);
 }