public override void Visit(BasicState basicState) { SkillState skillState = skill.GetSkillState(); skillState.SetTargetUnit(basicState.GetTargetUnit()); basicState.ChageToSkillState(skill.GetSkillState()); }
public override void Visit(BasicState basicState) { if (false == basicState.IsTargetIngState()) { BasicState idleState = player.GetBasicState(); idleState.Stop(); player.SetState(idleState); } Unit targetUnit = basicState.GetTargetUnit(); if (range > player.DistanceToUnit(targetUnit)) { SkillState skillState = skill.GetSkillState(); skillState.SetTargetUnit(targetUnit); basicState.ChageToSkillState(skill.GetSkillState()); } else { basicState.ChaseTarget(targetUnit); } }