public bool HasLearnedSkill(string skillName, out Skill learnedSkill) { //TEMP learnedSkill = null; if (SkillByName(skillName, out learnedSkill)) { SkillKnowledgeState state = learnedSkill.KnowledgeState; return((state == SkillKnowledgeState.Enabled || state == SkillKnowledgeState.Learned) || GameManager.Get.EnableAllSkills); } return(false | GameManager.Get.EnableAllSkills); }
public bool HasLearnedSkill(string skillName, out float skillUsageLevel) { //TEMP skillUsageLevel = 0f; Skill learnedSkill = null; if (SkillByName(skillName, out learnedSkill)) { SkillKnowledgeState state = learnedSkill.KnowledgeState; skillUsageLevel = learnedSkill.State.NormalizedUsageLevel; return((state == SkillKnowledgeState.Enabled || state == SkillKnowledgeState.Learned) || GameManager.Get.EnableAllSkills); } return(false | GameManager.Get.EnableAllSkills); }
public void SetColors(Color skillIconColor, Color skillBorderColor, SkillKnowledgeState knowledgeState, string iconName) { SkillBGColor = Colors.Darken(Color.Lerp(skillIconColor, skillBorderColor, 0.5f)); SkillNameColor = Color.white; SkillBorderColor = skillBorderColor; SkillIconColor = skillIconColor; Icon.atlas = Mats.Get.IconsAtlas; Icon.spriteName = iconName; IconBackround.color = SkillBorderColor; switch (knowledgeState) { case SkillKnowledgeState.Enabled: case SkillKnowledgeState.Learned: default: Icon.color = Colors.Lighten(SkillIconColor, 0.5f, 1f); SkillBGColor = Color.Lerp(SkillIconColor, SkillBorderColor, 0.5f); ProgressionSprite.enabled = true; break; case SkillKnowledgeState.Known: Icon.color = SkillIconColor; SkillBGColor = Color.Lerp(SkillIconColor, SkillBorderColor, 0.5f); ProgressionSprite.enabled = false; break; case SkillKnowledgeState.Unknown: Icon.color = SkillIconColor; SkillBGColor = Colors.Desaturate(SkillBGColor); SkillNameColor = Colors.Lighten(SkillBGColor); ProgressionSprite.enabled = false; break; } if (mHasBeenMastered) { ProgressionSprite.enabled = false; Background.color = Color.Lerp(SkillBGColor, Colors.Get.SkillMasteredColor, 0.5f); } else { ProgressionSprite.color = Colors.Alpha(Colors.BlendThree(Colors.Get.SkillLearnedColorLow, Colors.Get.SkillLearnedColorMid, Colors.Get.SkillLearnedColorHigh, mNormalizedMasteryLevel), 0.5f); Background.color = Colors.Darken(SkillBGColor); } Name.color = SkillNameColor; }
public SkillStartupSetting(string skillName, SkillKnowledgeState state, bool mastered) { SkillName = skillName; KnowledgeState = state; Mastered = mastered; }