public void Change(GameData.GameState state) { switch (state) { case GameData.GameState.Battle: Stream = battleMusic; Play(); Playing = true; break; case GameData.GameState.TitleScreen: Stream = titleScreenMusic; Play(); Playing = true; break; case GameData.GameState.Village: Stream = villageMusic; Play(); Playing = true; break; case GameData.GameState.None: Playing = false; break; } }
private void OnGameStateChanged(GameData.GameState newState) { if (newState == GameData.GameState.GameOver) { InputListener.ButtonDown += StartGame; } else { InputListener.ButtonDown -= StartGame; } }
private void OnGameStateChanged(GameData.GameState state) { if (state == GameData.GameState.GameOver) { m_inputField.enabled = true; } else { m_inputField.enabled = false; } }
private void OnGameStateChanged(GameData.GameState state) { if (state == GameData.GameState.GameOver) { gameObject.SetActive(true); } else { gameObject.SetActive(false); } }
private void OnGameStateChanged(GameData.GameState state) { if (state == GameData.GameState.GameOver) { SetBottomAnchorY(m_startPosition); } else { SetBottomAnchorY(0); } }
void OnStateChanged(GameData.GameState newState) { switch (newState) { case GameData.GameState.Unplanted: GetComponent <Image>().color = Color.green; break; case GameData.GameState.Planted: GetComponent <Image>().color = Color.red; break; case GameData.GameState.GameOver: GetComponent <Image>().color = Color.white; break; } }
public void PreInit(GameData.GameState targetState, GeneralDialogue dialogue, Func <Clue, bool> findClue) { findClueEvent = findClue; background.color = ColorTools.LerpColorValues(Skinning.GetSkin(SkinTag.PICTO), ColorTools.Value.SV, new int[2] { 8, 10 }); characterPortrait.Hide(); characters.ForEach(item => item.Init(() => ChangeCharacter(item.character))); ColorBlock block = dialogueScroll.colors; block.normalColor = Skinning.GetSkin(SkinTag.SECONDARY_ELEMENT); block.highlightedColor = Skinning.GetSkin(SkinTag.SECONDARY_WINDOW); block.pressedColor = Skinning.GetSkin(SkinTag.CONTRAST); dialogueScroll.colors = block; scrollButton.Init(this); block = scrollButton.button.colors; block.normalColor = Skinning.GetSkin(SkinTag.PRIMARY_ELEMENT); block.highlightedColor = Skinning.GetSkin(SkinTag.PRIMARY_WINDOW); block.pressedColor = Skinning.GetSkin(SkinTag.CONTRAST); block.disabledColor = block.normalColor; scrollButton.button.colors = block; // when you come back to shogun after defeat if (targetState != GameData.GameState.NORMAL) { // unlocks all clues foreach (Clue clue in dialogue.GetAllClues()) { findClue.Invoke(clue); AddClueToList(clue, true); } } actualState = targetState; }
void SpawnConclusions(List <Conclusion> unlockableConclusions, GameData.GameState state) { conclusionsToUnlock = new List <Conclusion>(); foreach (Conclusion conclusion in unlockableConclusions) { ConclusionCard spawned = Instantiate(cardPrefab, cardList); spawned.Init(conclusion); if (state == GameData.GameState.GAME_OVER_FINISHER) { spawned.ShowCard(); } else { spawned.HideCard(); } conclusionsToUnlock.Add(new Conclusion(conclusion.category, conclusion.correctedSubCategory, spawned)); } }
private void Start() { state = GameData.LoadGame(slot); }
public GameScene(GameData.GameState ID, GameData gd) : base(ID, gd) { }
public Scene(GameData.GameState ID, GameData gd) { this.ID = ID; this.gd = gd; }
private void OnStateChanged(GameData.GameState newState) { InputListener.InterruptMainButton(); m_buttonPressedTimer = 0; }
private void Start() { dropdown = GetComponentInChildren <Dropdown>(); Language.SetLanguage(Language.Lang.enUS); state = GameData.LoadGame(slot); }
private void OnGameStateChanged(GameData.GameState newState) { SetTextOnUp(); }
public MainMenuScene(GameData.GameState ID, GameData gd) : base(ID, gd) { }
public void SpecificInit(bool useCheats, List <Clue> clueList, List <Conclusion> unlockableConclusions, List <ShogunCharacter> characters, string goodFeedback, string badFeedback, Action returnCallback, Action combatCallback, GameData.GameState actualState) { this.useCheats = useCheats; toCombat = combatCallback; goodDeityFeedbcak = goodFeedback; badDeityFeedback = badFeedback; SpawnKnobs(clueList, characters); SpawnConclusions(unlockableConclusions, actualState); deityWritter.SetAudio(() => AudioManager.PlaySound("Writting"), () => AudioManager.StopSound("Writting")); returnButton.onClick.AddListener(() => { returnCallback.Invoke(); SetStateCursor(false); AudioManager.PlaySound("Button"); }); combatButton.onClick.AddListener(() => { bool can = true; foreach (Conclusion conclusion in conclusionsToUnlock) { if (!conclusion.IsUnlocked(true)) { can = false; } } if (can) { SetStateCursor(false); if (actualState == GameData.GameState.NORMAL) { Invoke(lineTries <= goodGameThreshold ? "StartGoodFeedback" : "StartBadFeedback", 2.55f); anim.Play("GoodFeedback"); AudioManager.PlaySound("DeityDeduction"); } else { toCombat.Invoke(); AudioManager.PlaySound("Button"); } } else { AudioManager.PlaySound("ConclusionFail"); } }); selectionPath = new List <Path>(); persistentPath = new List <Path>(); selectedClues = new List <Clue>(); isSettingPath = false; inFeedback = false; clueDisplayTimer = 0; lineTries = 0; foreach (TextMeshProUGUI child in transform.GetChildrenOfType <TextMeshProUGUI>()) { if (child != deityWritter.GetComponent <TextMeshProUGUI>()) { child.font = streetFont; child.wordSpacing = 5; } } ResetPopup(); }