public void Init(WitchSkillBase witchSkill) { _witch = witchSkill.Witch; _skill = witchSkill; foreach (WitchSkillArrowSubArrow a in GetComponentsInChildren <WitchSkillArrowSubArrow>()) { if (a.name == "CenterArrow") { _centerArrow = a; continue; } _subArrows.Add(a); } WitchSkillArrowSubArrow[] obj = new WitchSkillArrowSubArrow[1]; obj[0] = _centerArrow; _onObjs.Add(obj); obj = new WitchSkillArrowSubArrow[2]; obj[0] = _subArrows[1]; obj[1] = _subArrows[2]; _onObjs.Add(obj); obj = new WitchSkillArrowSubArrow[2]; obj[0] = _subArrows[0]; obj[1] = _subArrows[3]; _onObjs.Add(obj); }
void Update() { if ((m_useSkill = SelectSkill()) == null) { Witch.SetState(WitchState.Idle); } m_useSkill.OnSkill(GameObject.Find("Player").transform); Witch.SetState(WitchState.Run); }
public void Init(WitchSkillBase witchSkill) { _skill = witchSkill; _witch = witchSkill.Witch; foreach (WitchSkillFootholdFire a in GetComponentsInChildren <WitchSkillFootholdFire>()) { a.gameObject.SetActive(false); _fires.Add(a); } }
public void Init(WitchSkillBase skill) { _witch = skill.Witch; _skill = skill; _state = 0; _in = transform.Find("In").gameObject; _out = transform.Find("Out").gameObject; _in.SetActive(false); _out.SetActive(false); }
public void Init(WitchSkillBase witchSkill) { _witch = witchSkill.Witch; _skill = witchSkill; foreach (WitchSkillAFire c in GetComponentsInChildren <WitchSkillAFire>()) { c.gameObject.SetActive(false); _fires.Add(c); } }
private WitchSkillBase SelectSkill() { WitchSkillBase skill = null; foreach (WitchSkillBase s in Witch.SkillSys.Skills.Values) { if (s.Distance == 0.0f) { continue; } if (s.Distance >= m_minDis) { continue; } m_minDis = s.Distance; skill = s; } return(skill); }
public void OnTeleport(Transform target, int type) { _oldSkill = WitchSkill.Teleport; _curSkill = _skills[_oldSkill]; _curSkill.OnSkill(target, type); }
public void OnSkill(WitchSkill skill, Transform target) { _oldSkill = skill; _curSkill = _skills[_oldSkill]; _curSkill.OnSkill(target); }
public override void BeginState() { m_minDis = Mathf.Infinity; m_useSkill = null; Witch.RotateToTarget(GameObject.Find("Player").transform.position); }