public static Type GetType(SkillData.Element offender, SkillData.Element defender) { if (IsStrong(offender, defender)) { return(Type.Strong); } else if (IsWeak(offender, defender)) { return(Type.Weak); } return(Type.Normal); }
private Color GetColor(SkillData.Element type) { switch (type) { case SkillData.Element.Fire: return(Color.red); case SkillData.Element.Water: return(Color.blue); case SkillData.Element.Wind: return(Color.green); } return(Color.red); }
private static bool IsWeak(SkillData.Element offender, SkillData.Element defender) { switch (offender) { case SkillData.Element.Fire: return(defender == SkillData.Element.Water); case SkillData.Element.Water: return(defender == SkillData.Element.Wind); case SkillData.Element.Wind: return(defender == SkillData.Element.Fire); } return(false); }
public void SetElement(SkillData.Element type) { fillArea.GetComponentInChildren <Image>().color = GetColor(type); }
private EnemyData(int hp, SkillData.Element element) { this.hp = hp; this.element = element; }
public void SetElement(SkillData.Element type) { gameObject.SetActive(false); }