public void SendNextQueuedCommand() { if (!CommandQueue.IsEmpty) { cmdTimer.StartTimer(60); CommandQueueInProgress = true; if (CommandQueue.Peek() is EtcCommand) { EtcCommand nextCommand = (EtcCommand)CommandQueue.Dequeue(); SendCommand(nextCommand); } else { string nextCommand = (string)CommandQueue.Dequeue(); SendLine(nextCommand); } } else { CommandQueueInProgress = false; cmdTimer.StopTimer(); } }
public void SetScene() { EtcCommand cmd; Debug.Console(2, "Set Scene: {0}", sceneName); cmdType = "pst"; cmdAction = "act"; if (this.space != null) { if (this.fadeTime != null) { cmd = new EtcCommand(this.cmdType, this.cmdAction, this.sceneName, this.space, this.fadeTime, _etx); } else { cmd = new EtcCommand(this.cmdType, this.cmdAction, this.sceneName, this.space, _etx); } } else { cmd = new EtcCommand(this.cmdType, this.cmdAction, this.sceneName, _etx); } devPollTimer.StartTimer(1); _Parent.SendCommand(cmd); //_Parent.EnqueueCommand(cmd); }
private void Start() { MessageText.text = LanguageMgr.GetInstance().ShowText(HiddenObjectKey.TieHand); cmdTimer = CommandTimer.CreateTimer("PromptTyingHandTimer"); cmdTimer.StartTimer(CountDownNum, FinishTimer, ShowLeftTime); //SendMessage(HiddenObjectMessage.MsgStopGame, "", "True"); //CloseUIForm(HiddenObjectPage.ResettingPage, true); }