示例#1
0
    public AbilityEffectSaveData GetAbilityEffectSaveData()
    {
        AbilityEffectSaveData abilityEffectSaveData = new AbilityEffectSaveData();

        abilityEffectSaveData.DataIdList = new List <int>()
        {
            potionIdInUse
        };
        abilityEffectSaveData.abilityEffectData = AbilityEffectData.Potion;
        abilityEffectSaveData.remainingTurn     = AbilityEffectService.NUM_OF_INFINITY;

        return(abilityEffectSaveData);
    }
    /// <summary>
    /// 인게임 세이브 데이터에 필요한 AbilityEffect 저장 데이터를 반환
    /// </summary>
    /// <returns>AbilityEffect 인게임 저장 데이터</returns>
    public List <AbilityEffectSaveData> GetSaveData()
    {
        List <AbilityEffectSaveData> abilityEffectSaveDataList = new List <AbilityEffectSaveData>();

        foreach (var uiabilityEffect in uiAbilityEffectList)
        {
            var dataIdList        = uiabilityEffect.abilityEffect.dataIdList;
            var abilityEffectData = uiabilityEffect.abilityEffect.abilityEffectData;
            var remainingTurn     = uiabilityEffect.abilityEffect.remainingTurn;

            var abilityEffectSaveData = new AbilityEffectSaveData(dataIdList, abilityEffectData, remainingTurn);
            abilityEffectSaveDataList.Add(abilityEffectSaveData);
        }

        return(abilityEffectSaveDataList);
    }