public AdventurerData(GameObject input) : base(input) { Adventurer inputAdventurer = input.GetComponent <Adventurer>(); battleStat = inputAdventurer.GetBattleStat(); if (inputAdventurer.GetEnemy() != null) { enemy = new CombatantPtr(inputAdventurer.GetEnemy()); } if (inputAdventurer.curHuntingArea != null) { curHuntingArea = inputAdventurer.curHuntingArea.index; } //Debug.Log("name : " + inputAdventurer.name); if (inputAdventurer.GetSkills() != null) { skills = inputAdventurer.GetSkills().Keys.ToList(); } temporaryEffects = new Dictionary <string, TemporaryEffectData>(); Dictionary <string, TemporaryEffect> tempEffectsOrigin = inputAdventurer.GetTemporaryEffects(); if (tempEffectsOrigin != null) { foreach (string key in tempEffectsOrigin.Keys.ToList()) { temporaryEffects.Add(key, new TemporaryEffectData(tempEffectsOrigin[key])); } } //if (!isActive && stat == null) // Debug.Log("stat is null"); }
public MonsterData(GameObject input) : base(input) { Monster inputMonster = input.GetComponent <Monster>(); index = inputMonster.index; monsterNum = inputMonster.monsterNum; battleStat = inputMonster.GetBattleStat(); if (inputMonster.GetEnemy() != null) { enemy = new CombatantPtr(inputMonster.GetEnemy()); } skills = inputMonster.GetSkills().Keys.ToList(); temporaryEffects = new Dictionary <string, TemporaryEffectData>(); Dictionary <string, TemporaryEffect> tempEffectsOrigin = inputMonster.GetTemporaryEffects(); foreach (string key in tempEffectsOrigin.Keys.ToList()) { temporaryEffects.Add(key, new TemporaryEffectData(tempEffectsOrigin[key])); } }