//効果の処理 private IEnumerator EffctExecution(BattleCommand battleCommand) { BattleCharacter owner = battleCommand.owner; List <BattleCharacter> targets = battleCommand.target; TargetUnit targetUnit = battleCommand.GetTargetType().targetUnit; PlayableAsset playableAsset = battleCommand.GetCommand().animation; var effects = battleCommand.GetEffect(); //効果の範囲が全体の場合 if (battleCommand.GetTargetType().targetRange == TargetRange.全体) { //敵キャラクタの行動はアニメション表示をしない if (owner is PlayerCharacter) { BattleDirectorController.Instance.AnimationPlay(playableAsset); } } foreach (var effect in effects) { //単体処理 foreach (var target in targets) { //ターゲットが存在しないとき新しいターゲットに変更する BattleCharacter newTarget = target; if (TargetUnit.死亡者 != targetUnit && target.IsDead()) { TargetFilter targetFilter = new TargetFilter(); newTarget = targetFilter.Auto(battleCommand); } //効果の処理 if (battleCommand.GetTargetType().targetRange == TargetRange.単体) { //敵キャラクタの行動はアニメション表示をしない if (owner is PlayerCharacter) { BattleDirectorController.Instance.AnimationPlay(playableAsset, newTarget.transform); } } effect.Use(owner, newTarget); //演出を再生する yield return(BattleDirectorController.Instance.Play()); } } yield break; }