コード例 #1
0
    public JobDataState Copy()
    {
        JobDataState state = new JobDataState();


        string[] keys          = JobPoints.Keys.ToArray();
        string[] jobAndRaceKey = TalentsLearned.Keys.ToArray();


        foreach (string k in keys)
        {
            state.JobPoints[k] = JobPoints[k];
        }

        state.AddJobKeys(jobAndRaceKey.ToList());

        foreach (string k in jobAndRaceKey)
        {
            foreach (string talent in TalentsLearned[k])
            {
                state.LearnSkill(k, talent);
            }
        }

        return(state);
    }
コード例 #2
0
ファイル: ActorData.cs プロジェクト: Tathomp/TacticsGame
    public void LearnTalent(string jobKey, Talent talent)
    {
        JobDataState.LearnSkill(jobKey, talent.GetKey());

        if (talent.HasPassive())
        {
            LearnPassiveBuff(talent.PassiveBuff);
        }

        if (talent.HasLearnAnotherSkill())
        {
            talent.jobeEffect.OnApply(this, null);
        }
    }