private void OnEnable() { vocationGUI = (VocationStatData)target; soTarget = new SerializedObject(target); Name = soTarget.FindProperty("name"); description = soTarget.FindProperty("description"); icon = soTarget.FindProperty("icon"); baseVitality = soTarget.FindProperty("baseVitality"); basePower = soTarget.FindProperty("basePower"); baseSpeed = soTarget.FindProperty("baseSpeed"); baseDefence = soTarget.FindProperty("baseDefence"); baseResolve = soTarget.FindProperty("baseResolve"); BST = soTarget.FindProperty("BST"); vitality = soTarget.FindProperty("vitality"); power = soTarget.FindProperty("power"); speed = soTarget.FindProperty("speed"); defence = soTarget.FindProperty("defence"); resolve = soTarget.FindProperty("resolve"); TS = soTarget.FindProperty("TS"); skills = soTarget.FindProperty("vocationSkills"); }
private void VocationStats(VocationStatData actorVocationData) { //targetCurveValue = primaryVocation.defCurve.Evaluate(normalizedValue); float normalizedValue = Mathf.InverseLerp(0, maxLevel, actorLevel); actorVocationData.RemoveLevelStat(this); actorVocationData.FetchCurrentStat(this, normalizedValue); }