public void setMonsterStatus(MonsterType monsterType, bool isReady) { UserMonsterTO um = getMonster(monsterType); um.monsterReady = isReady; MarkToSave(); }
public int getMonsterLastUsed(MonsterType monsterType) { UserMonsterTO userMonster = getMonster(monsterType); DateTime now = DateTime.Now.Date; return((int)((now - userMonster.monsterLastUsed).TotalDays)); }
public void setMonsterGageValue(Monster monster) { UserMonsterTO um = getMonster(monster.MonsterType); um.monsterGageValue = monster.GageValue; MarkToSave(); }
public void setMonsterStatus(Monster monster) { UserMonsterTO um = getMonster(monster.MonsterType); um.monsterReady = monster.IsReady; MarkToSave(); }
UserMonsterTO[] convertMonsters_2(int profileId) { List <UserMonsterTO> monsters = new List <UserMonsterTO>(); foreach (MonsterType type in Enum.GetValues(typeof(MonsterType))) { if (type != MonsterType.NONE) { UserMonsterTO monster = new UserMonsterTO(); monster.monsterType = type; monster.monsterLevelFaled = PlayerPrefs.GetInt(getPrefsKey_2(Keys_2.MonsterLevelFaled, profileId, ((int)type).ToString()), 0); monster.monsterLastUsed = new DateTime(long.Parse(PlayerPrefs.GetString(getPrefsKey_2(Keys_2.MonsterLastUsed, profileId, ((int)type).ToString()), System.DateTime.Now.Date.Ticks.ToString()))); monster.monsterEmotionType = (MonsterEmotionTypes)Enum.Parse(typeof(MonsterEmotionTypes), (PlayerPrefs.GetInt(getPrefsKey_2(Keys_2.MonsterEmotionType, profileId, ((int)type).ToString()), 0)).ToString()); monster.monsterReady = ((PlayerPrefs.GetInt(getPrefsKey_2(Keys_2.MonsterReady, profileId, ((int)type).ToString()), 0)) == 1) ? true : false; monster.monsterGage = PlayerPrefs.GetInt(getPrefsKey_2(Keys_2.MonsterGage, profileId, ((int)type).ToString()), 0); monster.monsterGageValue = PlayerPrefs.GetFloat(getPrefsKey_2(Keys_2.MonsterGageValue, profileId, ((int)type).ToString()), 0f); monsters.Add(monster); } } return(monsters.ToArray()); }
public int setMonsterLastUsed(Monster monster) { UserMonsterTO userMonster = getMonster(monster.MonsterType); userMonster.monsterLastUsed = DateTime.Now; MarkToSave(); return(getMonsterLastUsed(monster.MonsterType)); }
UserMonsterTO getMonster(MonsterType monsterType) { UserMonsterTO monster = null; if (mMonsters != null && mMonsters.ContainsKey(monsterType)) { monster = mMonsters[monsterType]; } return(monster); }
public void addFriendToCollection(MonsterType monsterType) { UserMonsterTO userMonster = getMonster(monsterType); if (userMonster == null) { mMonsters.Add(monsterType, UserMonsterTO.create(monsterType)); MarkToSave(); } }
public void setMonsterLevelFaled(Monster monster, int num) { if (monster.MiniGame == MiniGameController.GameType.None) { return; } UserMonsterTO userMonster = getMonster(monster.MonsterType); userMonster.monsterLevelFaled = num; MarkToSave(); }
public bool getMonsterStatus(Monster monster) { UserMonsterTO um = getMonster(monster.MonsterType); bool status = false; if (um != null) { status = um.monsterReady; } return(status); }
public void setMonsterEmotionType(Monster monster, MonsterEmotionTypes emotionType) { if (emotionType == MonsterEmotionTypes.NONE) { return; } UserMonsterTO userMonster = getMonster(monster.MonsterType); userMonster.monsterEmotionType = emotionType; MarkToSave(); }
public static UserMonsterTO create(MonsterType type) { UserMonsterTO monster = new UserMonsterTO(); monster.monsterType = type; monster.monsterLevelFaled = 0; monster.monsterLastUsed = DateTime.Now; monster.monsterEmotionType = MonsterEmotionTypes.Happy; monster.monsterReady = false; monster.monsterGage = 0; monster.monsterGageValue = 0; monster.monsterAccessories = new MonsterAccessoryTO[5]; return(monster); }
public void updateMonsterAccessory(Monster monster, int categoryId, MonsterAccessoryTO monsterItem) { UserMonsterTO um = getMonster(monster.MonsterType); if (um.monsterAccessories == null) { um.monsterAccessories = new MonsterAccessoryTO[5]; } if (um.monsterAccessories.Length < categoryId) { Array.Resize <MonsterAccessoryTO>(ref um.monsterAccessories, 5); } um.monsterAccessories[categoryId] = monsterItem; MarkToSave(); }
public MonsterAccessoryTO getMonsterAccessory(MonsterType monsterType, int categoryId) { UserMonsterTO um = getMonster(monsterType); if (um.monsterAccessories == null) { um.monsterAccessories = new MonsterAccessoryTO[5]; } if (um.monsterAccessories.Length < categoryId) { Array.Resize <MonsterAccessoryTO>(ref um.monsterAccessories, 5); } if (um.monsterAccessories[categoryId] != null) { return(um.monsterAccessories[categoryId]); } return(null); }
public float getMonsterGageValue(Monster monster) { UserMonsterTO um = getMonster(monster.MonsterType); return(um.monsterGageValue); }
public int getMonsterGage(Monster monster) { UserMonsterTO um = getMonster(monster.MonsterType); return(um.monsterGage); }
public int getMonsterLevelFaled(Monster monster) { UserMonsterTO userMonster = getMonster(monster.MonsterType); return(userMonster.monsterLevelFaled); }
public MonsterEmotionTypes getMonsterEmotionType(Monster monster) { UserMonsterTO userMonster = getMonster(monster.MonsterType); return(userMonster.monsterEmotionType); }