/// <summary> /// 攻撃段階を作成するファクトリー /// </summary> /// <param name="step">攻撃段階</param> /// <returns></returns> public static IAttackStep CreateStep(EAttackStep step) { switch (step) { case EAttackStep.Find: return(new AttackStepFind()); case EAttackStep.CloseTo: return(new AttackStepClose()); case EAttackStep.Attack: return(new AttackStepAttack()); default: return(new AttackStepFind()); } }
public void Update(AttackComponent attackComponent) { nextStep = attackComponent.CloseToTarget(); //ターゲットに接近 }
public void Update(AttackComponent attackComponent) { nextStep = attackComponent.AttackTarget(); //Targetを攻撃 }
void IAttackStep.Update(AttackComponent attackComponent) { nextStep = attackComponent.FindUnit(); //ターゲットを探す }