private IEnumerator OpenDoor() { MessageWindow messageWindow = MessageSystem.GetWindow(); bool hasItem = InventorySystem.HasItem(keyItem); if (!hasItem) { yield return(StartCoroutine(messageWindow.ShowClick("ドアを開けるには鍵が必要なようだ"))); messageWindow.Close(); } else { yield return(StartCoroutine(messageWindow.ShowClick("ガチャ! ドアの鍵を開けた"))); messageWindow.Close(); //ドアを開ける door.SetActive(false); //イベントが起動しないようにする triggerColider.enabled = false; //鍵を消費する InventorySystem.Remove(keyItem); //フラグの保存 VariablePersister.SetBool(key, true); } yield return(null); }
public IEnumerator OpenBox() { MessageWindow messageWindow = MessageSystem.GetWindow(); InteractableStart(); if (ItemExists()) { yield return(StartCoroutine(messageWindow.ShowClick("からっぽだ"))); messageWindow.Close(); InteractableEnd(); yield break; } isObtain = true; SpriteRenderer spriteRenderer = GetComponent <SpriteRenderer>(); spriteRenderer.sprite = enptyImage; GameController.GetInventorySystem().AddItem(item); string ms = item.itemName + "を手に入れた"; yield return(StartCoroutine(MessageSystem.GetWindow().ShowClick(ms))); messageWindow.Close(); InteractableEnd(); yield break; }
void BmClient_StartGameGetReceived(object sender, StartGameGetReceivedEventArgs e) { if (mw != null) { mw.DialogResult = true; mw.Close(); } GameFolder.GameData.opponent.Name = e.name; GameFolder.Game g = (GameFolder.Game)(this.MyParent).FindName("game1"); g.Start((short)GameFolder.Enums.PlayerControlledCharacterEnum.player1); }
private void AuthWindow1_Closed(object sender, EventArgs e) { if (!IsAuth) { MessageWindow.Close(); } }
public IEnumerator Switching() { MessageWindow messageWindow = MessageSystem.GetWindow(); InteractableStart(); //スイッチがオンのときオフに切り替える //Switch off when switch is on if (isOnSwitch) { isOnSwitch = false; spriteRenderer.sprite = offImage; OffSwitch.Invoke(); yield return(new WaitForSeconds(wait)); yield return(StartCoroutine(messageWindow.ShowClick(offMessage))); } else { isOnSwitch = true; spriteRenderer.sprite = onImage; OnSwitch.Invoke(); yield return(new WaitForSeconds(wait)); yield return(StartCoroutine(messageWindow.ShowClick(onMessage))); } messageWindow.Close(); InteractableEnd(); yield break; }
public IEnumerator Talk() { MessageWindow messageWindow = MessageSystem.GetWindow(); ChoiceWindow choiceWindow = MessageSystem.GetChoise(); InteractableStart(); yield return(StartCoroutine(messageWindow.ShowClick("ひと晩" + roomCharge + "ゴールドですが\nおとまりになられますか"))); yield return(StartCoroutine(choiceWindow.Choice())); int choiceResult = choiceWindow.Result(); if (choiceResult == 1) { if (GameController.Instance.money <= 0) { yield return(StartCoroutine(messageWindow.ShowClick("お金が たりないようです"))); messageWindow.Close(); InteractableEnd(); yield break; } yield return(StartCoroutine(messageWindow.ShowClick("それでは ごゆっくり おやすみください"))); GameController.Instance.money -= roomCharge; Stay(); yield return(StartCoroutine(SceneFader.FadeSceneOut())); yield return(StartCoroutine(SceneFader.FadeSceneIn())); yield return(StartCoroutine(messageWindow.ShowClick("おはようございます。ではいってらっしゃいませ"))); } else { yield return(StartCoroutine(messageWindow.ShowClick("お気をつけて 旅をつづけられますように"))); } messageWindow.Close(); InteractableEnd(); yield break; }
public IEnumerator Shopping() { MessageWindow messageWindow = MessageSystem.GetWindow(); yield return(StartCoroutine(messageWindow.ShowClick("いらしゃいませ"))); messageWindow.Close(); var m_shop = Instantiate(shop); m_shop.product = items; m_shop.Open(); yield return(new WaitUntil(() => m_shop.isOpen == false)); yield return(StartCoroutine(messageWindow.ShowClick("またのおこしを"))); messageWindow.Close(); yield break; }
public override void Close() { this.gameObject.SetActive(false); MessageWindow.Close(); if (selection != null) { selection.Close(); } if (backLog != null) { backLog.Close(); } }
protected override void ChangeStatus(UiStatus newStatus) { switch (newStatus) { case UiStatus.Backlog: if (backLog == null) { return; } MessageWindow.Close(); if (selection != null) { selection.Close(); } if (backLog != null) { backLog.Open(); } Engine.Config.IsSkip = false; break; case UiStatus.HideMessageWindow: MessageWindow.Close(); if (selection != null) { selection.Close(); } if (backLog != null) { backLog.Close(); } Engine.Config.IsSkip = false; break; case UiStatus.Default: MessageWindow.Open(); if (selection != null) { selection.Open(); } if (backLog != null) { backLog.Close(); } break; } this.status = newStatus; }
public IEnumerator PicUp(string itemName) { if (isOpen) { yield break; } isOpen = true; MessageWindow messageWindow = MessageSystem.GetWindow(); SpriteRenderer spriteRenderer = GetComponent <SpriteRenderer>(); spriteRenderer.sprite = enptyImage; string ms = itemName + "を手に入れた"; yield return(StartCoroutine(MessageSystem.GetWindow().ShowClick(ms))); messageWindow.Close(); yield break; }
public IEnumerator Talk() { MessageWindow messageWindow = MessageSystem.GetWindow(); Conversation conversation = GetComponent <Conversation>(); InteractableStart(); //会話文章の表示 //display talk List <string> content = conversation.conversation; foreach (var item in content) { yield return(StartCoroutine(messageWindow.ShowClick(item))); } messageWindow.Close(); InteractableEnd(); }
public IEnumerator Talk() { MessageWindow messageWindow = MessageSystem.GetWindow(); PlayerInteract.InteractableStart(); //会話文章の表示 //display talk List <string> content = conversation; foreach (var item in content) { yield return(new WaitForEndOfFrame()); yield return(StartCoroutine(messageWindow.ShowClick(item))); yield return(new WaitForEndOfFrame()); } messageWindow.Close(); PlayerInteract.InteractableEnd(); }
public IEnumerator OpenBox() { MessageWindow messageWindow = MessageSystem.GetWindow(); PlayerInteract.InteractableStart(); if (isOpen) { yield return(StartCoroutine(messageWindow.ShowClick("からっぽだ"))); messageWindow.Close(); PlayerInteract.InteractableEnd(); yield break; } //お金が入っていた if (money > 0) { yield return(GetMony()); } //アイテムが入っていた if (item != null) { yield return(GetItem()); } //装備が入っていた if (equipment != null) { yield return(GetEqip()); } //フラグの保存 VariablePersister.SetBool(key, true); PlayerInteract.InteractableEnd(); yield break; }
protected override void ChangeStatus(UiStatus newStatus) { switch (newStatus) { case UiStatus.Backlog: if (backLog == null) { return; } MessageWindow.Close(); if (selection != null) { selection.Close(); } Engine.Config.IsSkip = false; if (backLog != null) { backLog.Open(); } if (config != null) { config.Close(); } if (menu != null) { menu.Close(); } if (config != null) { inventory.Close(); } if (itemDetail != null) { itemDetail.Close(); } break; case UiStatus.HideMessageWindow: MessageWindow.Close(); if (selection != null) { selection.Close(); } Engine.Config.IsSkip = false; if (backLog != null) { backLog.Close(); } if (config != null) { config.Close(); } if (menu != null) { menu.Close(); } if (inventory != null) { inventory.Close(); } if (itemDetail != null) { itemDetail.Close(); } break; case UiStatus.Menu: MessageWindow.Close(); if (selection != null) { selection.Close(); } Engine.Config.IsSkip = false; if (menu != null) { menu.Open(); } if (config != null) { config.Close(); } if (backLog != null) { backLog.Close(); } if (inventory != null) { inventory.Close(); } if (itemDetail != null) { itemDetail.Close(); } break; case UiStatus.Config: MessageWindow.Close(); if (selection != null) { selection.Close(); } Engine.Config.IsSkip = false; if (config != null) { config.Open(); } if (menu != null) { menu.Close(); } if (backLog != null) { backLog.Close(); } if (inventory != null) { inventory.Close(); } if (itemDetail != null) { itemDetail.Close(); } break; case UiStatus.Inventory: MessageWindow.Close(); if (selection != null) { selection.Close(); } Engine.Config.IsSkip = false; if (inventory != null) { inventory.Open(); } if (config != null) { config.Close(); } if (menu != null) { menu.Close(); } if (backLog != null) { backLog.Close(); } if (itemDetail != null) { itemDetail.Close(); } break; case UiStatus.ItemDetail: MessageWindow.Close(); if (selection != null) { selection.Close(); } Engine.Config.IsSkip = false; if (itemDetail != null) { itemDetail.Open(); } if (inventory != null) { inventory.Close(); } if (config != null) { config.Close(); } if (menu != null) { menu.Close(); } if (backLog != null) { backLog.Close(); } break; case UiStatus.Default: MessageWindow.Open(); if (selection != null) { selection.Open(); } Engine.Config.IsSkip = false; if (backLog != null) { backLog.Close(); } if (menu != null) { menu.Close(); } if (config != null) { config.Close(); } if (inventory != null) { inventory.Close(); } if (itemDetail != null) { itemDetail.Close(); } break; } this.status = newStatus; }
private void Ok() { messageWindow.Close(); }
private void CloseMessageWindow() { messageWindow.Close(); }
public void End() { MessageWindow messageWindow = MessageSystem.Instance.messageWindow; messageWindow.Close(); }
/// <summary> /// Closes help window and removes close window handler /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <remarks></remarks> internal static void CloseMessageWindow(object sender, EventArgs e) { _messageWindowViewModel.RequestClose -= CloseMessageWindow; _messageWindow.Close(); }