public override void MakeEffects(ActionEffects effects) { var val = new RandomFloatValue { Max = Max, Min = Min, Step = (Max - Min) / 100, }; var e = new SimpleListEffect(); e.EffectList.Add(new SetActorMemberEffect { Type = ActorMemberType.sx, Value = val, }); e.EffectList.Add(new SetActorMemberEffect { Type = ActorMemberType.sy, Value = new ActorMemberValue { Type = ActorMemberType.sx, }, }); effects.InitEffects.Add(e); }
public override void MakeEffects(ActionEffects effects) { var effectFiltered = new SimpleListEffect(); effectFiltered.EffectList.Effects.AddRange(Segments.IndexList.Select(x => (Effect) new FilteredEffect { Filter = new Effects.AnimationSegmentFilter { Segment = x }, Effect = Effect, })); if (Priority == EffectBehaviorPriority.First) { effects.UpdateEffects.Insert(0, effectFiltered); } else if (Priority == EffectBehaviorPriority.Last) { effects.InitEffects.Add(effectFiltered); } }
public override void MakeEffects(ActionEffects effects) { if (Value == 0) { return; } var e = MakeValue(); if (CheckAfter.HasValue) { var sle = new SimpleListEffect(); sle.EffectList.Add(e); sle.EffectList.Add(MakeCheckAfter()); e = sle; } if (CheckBefore.HasValue) { e = MakeCheckBefore(e); } Time.MakeEffects(effects, e); }
private Effect GetEffect() { var list = new SimpleListEffect(); if (RatioX.HasValue) { list.EffectList.Add(new SetActorMemberEffect { Type = ActorMemberType.vx, Value = new BinaryExpressionValue { Operator = BinaryOperator.Multiply, Left = new ActorMemberValue { Type = ActorMemberType.vx }, Right = new ConstValue { Value = RatioX.Value }, }, }); } if (RatioY.HasValue) { list.EffectList.Add(new SetActorMemberEffect { Type = ActorMemberType.vy, Value = new BinaryExpressionValue { Operator = BinaryOperator.Multiply, Left = new ActorMemberValue { Type = ActorMemberType.vy }, Right = new ConstValue { Value = RatioY.Value }, }, }); } return(list); }
public override void MakeEffects(ActionEffects effects) { var breakEffect = new SimpleListEffect(); breakEffect.EffectList.Add(new Effects.AnimationContinueEffect()); var filter = new SimpleListFilter(); filter.FilterList.Add(new Effects.AnimationSegmentFilter { Segment = Segment }); filter.FilterList.Add(new Effects.AnimationCountAfterFilter { Count = new ConstValue { Value = Tick } }); if (KeyReleased) { filter.FilterList.Add(new Effects.PlayerKeyReleasedFilter()); } effects.UpdateEffects.Add(new FilteredEffect { Filter = filter, Effect = breakEffect }); }
public override void MakeEffects(ActionEffects effects) { var rx = new ConstValue { Value = RatioX }; var ry = RatioY.HasValue ? new ConstValue { Value = RatioY.Value } : rx; var e = new SimpleListEffect(); e.EffectList.Add(new SetActorMemberEffect { Type = ActorMemberType.sx, Value = new BinaryExpressionValue { Operator = BinaryOperator.Multiply, Left = new ActorMemberValue { Type = ActorMemberType.sx }, Right = rx, }, }); e.EffectList.Add(new SetActorMemberEffect { Type = ActorMemberType.sy, Value = new BinaryExpressionValue { Operator = BinaryOperator.Multiply, Left = new ActorMemberValue { Type = ActorMemberType.sy }, Right = ry, }, }); effects.UpdateEffects.Add(e); }