protected override void OnEnable() { ScenesManager.SetEscapeMethod(null); SoundManager.GetInstance().StopBGM(Define.SoundType.GameBGM); scoreAssistance.SetScoreCallback(uiSystem.ScoreUpdate); gameTimeAssistance.SetGameTimeCallback(uiSystem.GameTimeUpdate); gameTimeAssistance.SetWarningTimeCallback(uiSystem.WarningTime); petAssistance.SetSkillCountCallback(uiSystem.UpdateSkillCount); tileSystem.SetComboCountCallback(uiSystem.UpdateComboCount); tileSystem.SetAddTimeCallback(uiSystem.AddTime); uiSystem.InitData(); tileSystem.InitData(); if (TipController.isShowing) { TipController.HideTip(() => { StartCoroutine(DelayFunc(delayTime, GameStartOpening)); }); } else { StartCoroutine(DelayFunc(delayTime, GameStartOpening)); } }
private static TipController GetInstance() { if (instance == null) { instance = FindObjectOfType <TipController>(); } return(instance); }
private void OnTriggerExit2D(Collider2D collision) { if (collision.gameObject.CompareTag("Doors") || collision.gameObject.CompareTag("TrashBin")) { interactiveObject = null; } if (collision.gameObject.CompareTag("Tip")) { TipController tip = (TipController)collision.gameObject.GetComponent("TipController"); tip.handleView(); } }
private void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.CompareTag("Coin") || other.gameObject.CompareTag("ThrownCoin")) { Destroy(other.gameObject); coins++; actionSound.volume = 0.15f * GameManager.instance.sfxMultiplier; actionSound.clip = coinPickSound; actionSound.Play(); coinsLabel.text = "x " + coins; } if (other.gameObject.CompareTag("Cup")) { Destroy(other.gameObject); hasCup = true; actionSound.volume = 0.5f * GameManager.instance.sfxMultiplier; actionSound.clip = cupPickSound; actionSound.Play(); cupHUD.enabled = true; } if (other.gameObject.CompareTag("Card")) { Destroy(other.gameObject); hasCard = true; actionSound.volume = 0.5f * GameManager.instance.sfxMultiplier; actionSound.clip = cardPickSound; actionSound.Play(); cardHUD.enabled = true; } if (other.gameObject.CompareTag("Tip")) { TipController tip = (TipController)other.gameObject.GetComponent("TipController"); tip.handleView(); } if (other.gameObject.CompareTag("Doors") || other.gameObject.CompareTag("CoffeeMachine")) { interactiveObject = other.gameObject; } if (other.gameObject.CompareTag("TrashBin")) { interactiveObject = other.gameObject; HighlightController lightController = (HighlightController)interactiveObject.GetComponentsInChildren <HighlightController> () [0]; StartCoroutine(lightController.FlashNow()); } }
private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); InitData(); } else { Destroy(gameObject); } }
public void OnPlayButton() { SoundManager.GetInstance().PlaySound(Define.SoundType.Click); int selectedPetCount = DataManager.GetInstance().GetTotalSelectedPetsCount(); if (selectedPetCount <= 0) { PopupSystem.GetPopup <BasicPopup>(Define.PopupType.Basic).SetData(DataManager.GetText(TextTable.cantPlayGameKey)); PopupSystem.OpenPopup(Define.PopupType.Basic); } else { UISystem.CloseDialog(Define.DialogType.GameReadyDialog, () => { TipController.ShowRandomTip(); ScenesManager.ChangeScene("GameScene"); }); } }
protected override void OnEnable() { activeAdoptGuideTutorial = !TutorialManager.GetInstance().IsCleared(Define.TutorialType.AdoptGuide); activeRewardGuideTutorial = !TutorialManager.GetInstance().IsCleared(Define.TutorialType.RewardGuide); lobbyUISystem.InitData(); popupSystem.InitData(); if (TipController.isShowing) { TipController.HideTip(() => { StartLobby(); }); } else { StartLobby(); } TestCoder.SetTestCode(KeyCode.Space, TestCode); }
public void OnHomeButton() { StopAllCoroutines(); TipController.ShowRandomTip(); ScenesManager.ChangeScene("LobbyScene"); }
public void OnHomeButton() { TipController.ShowRandomTip(); GameTimeAssistance.Continue(); ScenesManager.ChangeScene("LobbyScene"); }