public void EpilogueReview() { Click.Play(); StoryManager.storyreview_2 = true; Stage.SetActive(false); Epilogue.SetActive(true); GameObject.Find("BGM").GetComponent <AudioSource>().Stop(); GameObject.Find("BGM_Epi").GetComponent <AudioSource>().Play(); }
public void SpawnButtons() { for (int i = 0; i < choice.choices.Length; i++) { if (choice.choices[i].final == true) { choiceButtons[i] = Instantiate(finalChoiceBtn, panel.gameObject.transform); choiceButtons[i].gameObject.AddComponent <FinalBtn>(); Epilogue.fillString(choice.choices[i].epilogue); //choiceButtons[i].GetComponent<ButtonScript>().InformationPassing(choice,i,choiceButtons[i]); } else { choiceButtons[i] = Instantiate(prefab, panel.gameObject.transform); // cria o botão choiceButtons[i].gameObject.AddComponent <ButtonScript>(); //atribui o script que atribui a função choiceButtons[i].GetComponent <ButtonScript>().InformationPassing(choice, i, choiceButtons[i]); // passa a informaçao para a funçao poder ser atuada } choiceButtons[i].GetComponentInChildren <TextMeshProUGUI>().text = choice.choices[i].choice; // muda o texto do botão } }
void InitializeProperties() { SelectedTrim.Subscribe((v) => { SetTrimSettingsWith(v); }); Prologue.Subscribe((v) => { UpdateButtonStatus(); }); Epilogue.Subscribe((v) => { UpdateButtonStatus(); }); PrologueEnabled.Subscribe((v) => { UpdateButtonStatus(); }); EpilogueEnabled.Subscribe((v) => { UpdateButtonStatus(); }); TrimmingName.Subscribe((v) => { UpdateButtonStatus(); }); Started.Subscribe((V) => { UpdatePlayingState(); }); Pausing.Subscribe((v) => { UpdatePlayingState(); }); Duration.Subscribe((v) => { }); CommandRegister.Subscribe(ExecRegister); CommandApply.Subscribe(ExecApply); CommandUpdate.Subscribe(ExecUpdate); CommandUndo.Subscribe(ExecUndo); CommandCancel.Subscribe(ExecCancel); CommandSelect.Subscribe(ExecSelect); Rating.Subscribe(ChangeRating); }
/// <inheritdoc /> public IEnumerable <BasicBlock <TInstruction> > GetAllBlocks() { if (Prologue != null) { foreach (var block in Prologue.GetAllBlocks()) { yield return(block); } } foreach (var block in Contents.GetAllBlocks()) { yield return(block); } if (Epilogue != null) { foreach (var block in Epilogue.GetAllBlocks()) { yield return(block); } } }
public void QuitApplication() { Click.Play(); if (!Prologue.activeInHierarchy && !Epilogue.activeInHierarchy && !Extra.activeInHierarchy && !Stage.activeInHierarchy) { Application.Quit(); } else if (Prologue.activeInHierarchy) { Prologue.SetActive(false); Stage.SetActive(true); GameObject.Find("BGM").GetComponent <AudioSource>().Play(); GameObject.Find("BGM_Pro").GetComponent <AudioSource>().Stop(); if (PlayerPrefs.GetInt("Story") == 0) { PlayerPrefs.SetInt("Story", 1); } StoryManager.storyreview_0 = false; StoryManager.index = 0; } else if (Epilogue.activeInHierarchy) { Epilogue.SetActive(false); Stage.SetActive(true); GameObject.Find("BGM").GetComponent <AudioSource>().Play(); GameObject.Find("BGM_Epi").GetComponent <AudioSource>().Stop(); StoryManager.storyreview_2 = false; StoryManager.index = 0; } else if (Extra.activeInHierarchy) { Extra.SetActive(false); Stage.SetActive(true); GameObject.Find("BGM").GetComponent <AudioSource>().Play(); GameObject.Find("BGM_Extra").GetComponent <AudioSource>().Stop(); GameObject.Find("BGM_Extra2").GetComponent <AudioSource>().Stop(); if (PlayerPrefs.GetInt("Story") == 3) { PlayerPrefs.SetInt("Story", 4); } StoryManager.storyreview_3 = false; StoryManager.index = 0; } else if (Stage.activeInHierarchy) { Stage.SetActive(false); Main.SetActive(true); } //UnityEditor.EditorApplication.isPlaying = false; }
/// <inheritdoc /> public BasicBlock <TInstruction> GetLastBlock() => Epilogue?.GetLastBlock() ?? Contents.GetLastBlock() ?? Prologue?.GetLastBlock();
/// <inheritdoc /> public BasicBlock <TInstruction> GetFirstBlock() => Prologue?.GetFirstBlock() ?? Contents.GetFirstBlock() ?? Epilogue?.GetFirstBlock();
public static void ChangeEpilogue() { string s = Epilogue.giveString(); epilogue.text = s; }