public bool Update() { if (Input.GetKeyDown(KeyCode.Alpha1)) { skill = SkillDataBase.GetSkill(SkillType.Fire); } if (Input.GetKeyDown(KeyCode.Alpha2)) { skill = SkillDataBase.GetSkill(SkillType.Figa); } if (Input.GetKeyDown(KeyCode.Alpha3)) { skill = SkillDataBase.GetSkill(SkillType.Kearu); } return(skill.Update(unit)); }
public bool CheckEquationAnswer(int index, int guess) { if (index != currentEquationIndex) { return(false); } if (guess == currentEquation.answer) { Skill skill = SkillDataBase.GetSkill(currentEquation.type, currentEquation.answer); skill.AddProgress(ProfileManager.currentProfileIndex, .1f); currentEquation.status = Equation.Status.Correct; return(true); } else { Debug.Log("Wrong Answer"); currentEquation.status = Equation.Status.Incorrect; //NextEquation (); return(false); } }
public void SetUp() { BattleCanvas.Instance.OnActive(unit); skill = SkillDataBase.GetSkill(SkillType.Fire); }