public void SetEmotion(MonsterPettingZone zone, int i) { animController.SetInteger("EmotionState", i); if (i > 0) { count++; if (Cheering != null) { AudioController.Instance.PlaySound(Cheering); } if (count == NeededPats) { animController.SetBool("IsSad", false); MiniGameController.Instance.ResetEmotion(); Analitics.Instance.treckScreen("Monster Petting Done - Profile: " + UsersController.Instance.CurrentProfileId); } else if (count == PatsToClose) { Invoke("Complete", 2f); } if (zone.isTutorial) { UserInfo.Instance.SetLastPettingZoneTutorial(UserInfo.Instance.GetLastPettingZoneTutorial() + 1); } } else { StartTutorial(); } }
public void SetEmotion(MonsterPettingZone zone, int i) { animController.SetInteger("EmotionState", i); if (i > 0) { count++; if (Cheering != null) { AudioController.Instance.PlaySound(Cheering); } if (count == NeededPats) { animController.SetBool("IsSad", false); MiniGameController.Instance.ResetEmotion(); } else if (count == PatsToClose) { Invoke("Complete", 2f); } if (zone.isTutorial) { UsersController.Instance.userData().setLastPettingZoneTutorial(UsersController.Instance.userData().getLastPettingZoneTutorial() + 1); } } else { StartTutorial(); } }
void StartTutorial() { MonsterPettingZone[] zones = PettingZones.GetComponentsInChildren <MonsterPettingZone> (); int lastId = UserInfo.Instance.GetLastPettingZoneTutorial(); if (zones.Length > (lastId + 1)) { MonsterPettingZone zone = zones [lastId + 1]; if (zone != null) { zones [lastId + 1].startTutorial(); } } }