From aa712c9ffe691a17bf902cf5e09fdb214952d9d1 Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Sat, 5 May 2018 00:27:40 +0900 Subject: [PATCH] =?UTF-8?q?Num0=E3=82=AD=E3=83=BC=E3=81=AE=E5=88=A4?= =?UTF-8?q?=E5=AE=9A=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inferno/InfernoScripts/Parupunte/ParupunteCore.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs b/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs index 8754c231..e73e3f56 100644 --- a/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs +++ b/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs @@ -111,7 +111,19 @@ protected override void Setup() .Subscribe(_ => ParupunteStop()); OnKeyDownAsObservable.Where(x => x.KeyCode == Keys.NumPad0) - .Subscribe(_ => ParupunteStart(ChooseParupounteScript())); + .ThrottleFirst(TimeSpan.FromSeconds(2f), InfernoScriptScheduler) + .Subscribe(_ => + { + if (IsActive) + { + ParupunteStop(); + } + else + { + ParupunteStart(ChooseParupounteScript()); + } + + }); //パルプンテが停止したタイミングで開放 IsActiveAsObservable