Exemplo n.º 1
0
        public override void Load()
        {
            // Will show up in client.log under the ExampleMod name
            Logger.InfoFormat("{0} example logging", Name);

            // All code below runs only if we're not loading on a server
            if (!Main.dedServ)
            {
                if (FontExists("Fonts/ExampleFont"))
                {
                    exampleFont = GetFont("Fonts/ExampleFont");
                }

                // Custom UI
                PianoUI = new PianoUI();
                PianoUI.Activate();
                PianistUserInterface = new UserInterface();
                PianistUserInterface.SetState(PianoUI);
            }
        }
Exemplo n.º 2
0
        public override void Load()
        {
            // Will show up in client.log under the ExampleMod name
            Logger.InfoFormat("{0} example logging", Name);

            // Registers a new hotkey
            instrumentHotKey = RegisterHotKey("Instrument Key", "D");             // See https://docs.microsoft.com/en-us/previous-versions/windows/xna/bb197781(v=xnagamestudio.41) for special keys

            // All code below runs only if we're not loading on a server
            if (!Main.dedServ)
            {
                if (FontExists("Fonts/ExampleFont"))
                {
                    exampleFont = GetFont("Fonts/ExampleFont");
                }

                // Custom UI
                pianoUI = new PianoUI();
                pianoUI.Activate();
                pianistUserInterface = new UserInterface();
                pianistUserInterface.SetState(pianoUI);
            }
        }