public override void Execute(IImpactDelay data) { if (_context.BattleMode) { if (_context.TurnType == BattleTurnResultType.ActiveAbility || _context.TurnType == BattleTurnResultType.PassiveAbility) { _logic.BatchAbilityInFrame(); var frameData = new FrameAbility { FamiliarAnimStart = false, UnityId = null, Time = (float)_formula.Calculate(data.Value) }; _logic.Data = frameData; } else { _logic.BatchOtherInFrame(); var frameData = new FrameOther { Time = (float)_formula.Calculate(data.Value) }; _logic.Other = frameData; } } else { var delay = (float)_formula.Calculate(data.Value); _logic.BatchCutScene(delay); } }
public void BatchOtherInFrame() { var type = _context.TurnType; Other.ParentIndex = _battleBatches.Count; Other.Index = _framesOther.Count; Other.Actions.Add(_manager.Batch(() => $"Type = {type} {Other}")); _framesOther.Add(Other); Other = new FrameOther(); }
public void BatchBattle() { if (_context.TurnType == BattleTurnResultType.ActiveAbility || _context.TurnType == BattleTurnResultType.PassiveAbility) { throw new Exception($"Invalid write type OtherTurnResult. TurnType = {_context.TurnType}"); } BatchOtherInFrame(); _battleBatches.Add(new BattleTurnResult { OtherTurnResult = new OtherTurnResult { Index = _battleBatches.Count, Frames = _framesOther.ToArray(), }, Type = _context.TurnType }); Other = new FrameOther(); _framesOther.Clear(); }