public override bool Play() { Log.Debug(ToString()); Mode.CmdPictureEvent.Invoke(Id); string key = PlayerPrefsKey.GetKey(PlayerPrefsKey.ISLOCKED_PICTURE, Id); int value = PlayerPrefsKey.GetBoolToInt(false); CustomPlayerPrefs.SetInt(key, value); return(false); // no more child to play }
protected override void first() { string prefixKey = null; if (_mode.Character.IsChildHood()) prefixKey = PlayerPrefsKey.ISLOCKED_VACATION_CHILD; else prefixKey = PlayerPrefsKey.ISLOCKED_VACATION_ADULT; string key = PlayerPrefsKey.GetKey(prefixKey, _seasonId); int value = PlayerPrefsKey.GetBoolToInt(false); CustomPlayerPrefs.SetInt(key, value); _mode.Schedule.ActionFirstEvent.Invoke(); }
private void onNurtureEndingScenarioEnd() { Log.Debug("onNurtureEndingScenarioEnd"); StoryMode.ScenarioEndEvent.Detach(onNurtureEndingScenarioEnd); string key = PlayerPrefsKey.GetKey(PlayerPrefsKey.ISLOCKED_NURTURE_ENDING, _nurtureEndingId); int value = PlayerPrefsKey.GetBoolToInt(false); CustomPlayerPrefs.SetInt(key, value); if (Def.NURTURE_BAD_ENDING_ID == _nurtureEndingId) { Manager.Instance.End(); return; } _nurtureEndingId = -1; EndNurtureEvent.Invoke(); }
private void initialize() { SetContinueData(PlayerInitProperty.Name); int constitutionId = (int)PlayerInitProperty.Constitution; int zodiacId = (int)PlayerInitProperty.Zodiac; int condition = (int)Nurture.ECondition.Healthy; CustomPlayerPrefs.SetInt(PlayerPrefsKey.YEAR, Def.INIT_YEAR); CustomPlayerPrefs.SetInt(PlayerPrefsKey.MONTH, Def.INIT_MONTH); CustomPlayerPrefs.SetInt(PlayerPrefsKey.ZODIAC, zodiacId); CustomPlayerPrefs.SetInt(PlayerPrefsKey.CONDITION, condition); int actionCount = DT.Action.Count; for (int id = 0; id < actionCount; ++id) { string key = PlayerPrefsKey.GetKey(PlayerPrefsKey.ACTION_COUNT, id); CustomPlayerPrefs.SetInt(key, 0); } CustomPlayerPrefs.SetInt(PlayerPrefsKey.MONEY, Def.INIT_MONEY); CustomPlayerPrefs.SetInt(PlayerPrefsKey.CONSTITUTION, constitutionId); CustomPlayerPrefs.SetInt(PlayerPrefsKey.WEARING_COSTUME, Def.DEFAULT_COSTUME_ID); int costumeCount = DT.MainCharacterCostume.Count; for (int id = 0; id < costumeCount; ++id) { string key = PlayerPrefsKey.GetKey(PlayerPrefsKey.ISBUY_COSTUME, id); bool isBuy = false; if (Def.DEFAULT_COSTUME_ID == id) { isBuy = true; } int isBuyInteger = PlayerPrefsKey.GetBoolToInt(isBuy); CustomPlayerPrefs.SetInt(key, isBuyInteger); } CustomPlayerPrefs.SetInt(PlayerPrefsKey.STRESS, Def.MIN_STAT); Zodiac zodiac = DT.Zodiac[zodiacId]; CustomPlayerPrefs.SetInt(PlayerPrefsKey.STAMINA, zodiac.stamina); CustomPlayerPrefs.SetInt(PlayerPrefsKey.INTELLECT, zodiac.intellect); CustomPlayerPrefs.SetInt(PlayerPrefsKey.GRACE, zodiac.grace); CustomPlayerPrefs.SetInt(PlayerPrefsKey.CHARM, zodiac.charm); CustomPlayerPrefs.SetInt(PlayerPrefsKey.ATTACK, zodiac.attack); CustomPlayerPrefs.SetInt(PlayerPrefsKey.DEFENSE, zodiac.defense); CustomPlayerPrefs.SetInt(PlayerPrefsKey.LEADERSHIP, zodiac.leadership); CustomPlayerPrefs.SetInt(PlayerPrefsKey.TACTIC, zodiac.tactic); CustomPlayerPrefs.SetInt(PlayerPrefsKey.MORALITY, zodiac.morality); CustomPlayerPrefs.SetInt(PlayerPrefsKey.GOODNESS, zodiac.goodness); CustomPlayerPrefs.SetInt(PlayerPrefsKey.SENSIBILITY, zodiac.sensibility); CustomPlayerPrefs.SetInt(PlayerPrefsKey.ARTS, zodiac.arts); CustomPlayerPrefs.SetInt(PlayerPrefsKey.TARGET, -1); CustomPlayerPrefs.SetInt(PlayerPrefsKey.FEELING, Def.MIN_FEELING); CustomPlayerPrefs.SetInt(PlayerPrefsKey.LAST_OPENED_SCENARIO_NO, Def.MIN_SCENARIO - 1); }