Example #1
0
        public override void Start(RuntimeMod mod)
        {
            AllocConsole();
            soundCompleteId = hooks_instance.hookSoundComplete(new SoundCompleteAction((int soundId, string f) =>
            {
                Console.WriteLine("Sound from file " + f + " has finished");
            }));
            voiceCompleteId = hooks_instance.hookVoiceComplete(new VoiceCompleteAction((int vid, string f) =>
            {
                Console.WriteLine("Voice from file " + f + " has finished");

                if (!ff7.HasExited)
                {
                    getKeys();
                    IntPtr thisThread = GetCurrentThreadId();
                    AttachThreadInput(thisThread, new IntPtr(ff7.Threads[0].Id), true);
                    keySim.KeyDown((WindowsInput.Native.VirtualKeyCode)Keys[KeyBoardBindings.OK]);
                    Thread.Sleep(200);
                    keySim.KeyUp((WindowsInput.Native.VirtualKeyCode)Keys[KeyBoardBindings.OK]);
                    AttachThreadInput(thisThread, new IntPtr(ff7.Threads[0].Id), false);
                }
            }));
            initId = hooks_instance.hookInit(new InitAction(() =>
            {
                Console.WriteLine("Starting");
                Thread.Sleep(1000);
                getProccess();
                getKeys();
            }));
            closeId = hooks_instance.hookClose(new CloseAction(() =>
            {
                Console.WriteLine("Closing");
            }));
        }
Example #2
0
 public override void Start(RuntimeMod mod)
 {
     this._form = new fVoices((DataSource) new Plugin._7HDataSource(mod));
     this._form._basePluginDir = mod.BaseFolder + "\\";
     this._form.bGo.Visible    = false;
     this._form.Show();
 }
Example #3
0
    public ExampleRuntime(RuntimeMod mod)
    {
        _mod          = mod;
        _mod.OnStart += (s, a) => Start();

        _log = mod.Log;
        _log.LogInfo("Hello from ExampleRuntime.");
    }
Example #4
0
 public _7HDataSource(RuntimeMod mod)
 {
     this._mod = mod;
 }