diff --git a/SVSim.BattleEngine/Shim/View/VfxShim.cs b/SVSim.BattleEngine/Shim/View/VfxShim.cs index ed18822..02fa4cc 100644 --- a/SVSim.BattleEngine/Shim/View/VfxShim.cs +++ b/SVSim.BattleEngine/Shim/View/VfxShim.cs @@ -50,6 +50,10 @@ namespace Wizard.Battle.View.Vfx { protected readonly List _children = new List(); public static SequentialVfxPlayer Create() => new SequentialVfxPlayer(); + public static SequentialVfxPlayer Create(IEnumerable vfxCollection) + { var p = new SequentialVfxPlayer(); if (vfxCollection != null) p._children.AddRange(vfxCollection); return p; } + public static SequentialVfxPlayer Create(params VfxBase[] vfxCollection) + { var p = new SequentialVfxPlayer(); if (vfxCollection != null) p._children.AddRange(vfxCollection); return p; } public void Register(VfxBase vfx) { if (vfx != null) _children.Add(vfx); } public int Count() => _children.Count; public override bool IsVfxNonEmpty() @@ -62,11 +66,17 @@ namespace Wizard.Battle.View.Vfx public class ParallelVfxPlayer : SequentialVfxPlayer { public static new ParallelVfxPlayer Create() => new ParallelVfxPlayer(); + public static ParallelVfxPlayer Create(IEnumerable vfxCollection) + { var p = new ParallelVfxPlayer(); if (vfxCollection != null) p._children.AddRange(vfxCollection); return p; } + public static ParallelVfxPlayer Create(params VfxBase[] vfxCollection) + { var p = new ParallelVfxPlayer(); if (vfxCollection != null) p._children.AddRange(vfxCollection); return p; } } public class VfxWithLoading : SequentialVfxPlayer { public static new VfxWithLoading Create() => new VfxWithLoading(); + public static VfxWithLoading Create(VfxBase mainVfx) => new VfxWithLoading(); + public static VfxWithLoading Create(VfxBase loadingVfx, VfxBase mainVfx) => new VfxWithLoading(); public virtual VfxBase LoadingVfx => NullVfx.GetInstance(); public virtual VfxBase MainVfx => NullVfx.GetInstance(); } @@ -74,6 +84,7 @@ namespace Wizard.Battle.View.Vfx public class VfxWithLoadingSequential : VfxWithLoading { public static new VfxWithLoadingSequential Create() => new VfxWithLoadingSequential(); + public static VfxWithLoadingSequential Create(params VfxBase[] mainVfxCollection) => new VfxWithLoadingSequential(); public override VfxBase LoadingVfx => NullVfx.GetInstance(); public override VfxBase MainVfx => NullVfx.GetInstance(); public void RegisterToLoadingVfx(VfxBase vfxToRegister) { }