public AnimationCommodore(string text, double time, double visualPriority) : base(time, visualPriority) { TheLieutenant = new Image("lieutenant", new Vector3(-300, 500, 0)) { SizeX = 6, VisualPriority = Preferences.PrioriteGUIMenuPrincipal }; Bubble = new Image("bulle", new Vector3(-100, 300, 0)) { SizeX = 8, VisualPriority = Preferences.PrioriteGUIMenuPrincipal + 0.02f, Origin = Vector2.Zero }; TypeWriter = new TextTypeWriter ( text, Color.Black, new Vector3(20, 280, 0), @"Pixelite", 2.0f, new Vector2(600, 500), 50, true, 1000, true, new List<string>() { "sfxLieutenantParle1", "sfxLieutenantParle2", "sfxLieutenantParle3", "sfxLieutenantParle4" }, Scene ); TypeWriter.Text.VisualPriority = Preferences.PrioriteGUIMenuPrincipal; GPE = new EffectsController<IPhysical>(); GVE = new EffectsController<IVisual>(); MovePathEffect edt = new MovePathEffect(); edt.Delay = 0; edt.Length = this.Duration; edt.Progress = Effect<IPhysical>.ProgressType.Linear; edt.InnerPath = new Path2D (new List<Vector2> { new Vector2(-300, 500), new Vector2(-300, 275), new Vector2(-300, 275), new Vector2(-300, 700) }, new List<double> { 0, 1000, this.Duration - 1000, this.Duration }); GPE.Add(TheLieutenant, edt); edt = new MovePathEffect(); edt.Delay = 0; edt.Length = this.Duration; edt.Progress = Effect<IPhysical>.ProgressType.Linear; edt.InnerPath = new Path2D (new List<Vector2> { new Vector2(-100, 300), new Vector2(-100, -100), new Vector2(-100, -100), new Vector2(-100, 500) }, new List<double> { 0, 1000, this.Duration - 1000, this.Duration }); GPE.Add(Bubble, edt); edt = new MovePathEffect(); edt.Delay = 0; edt.Length = this.Duration; edt.Progress = Effect<IPhysical>.ProgressType.Linear; edt.InnerPath = new Path2D (new List<Vector2> { new Vector2(-75, 325), new Vector2(-75, -75), new Vector2(-75, -75), new Vector2(-75, 500) }, new List<double> { 0, 1000, this.Duration - 1000, this.Duration }); GPE.Add(TypeWriter.Text, edt); }
public void Show() { ClearActiveEffects(); InitPressStart(); VisualEffectsIds.Add(Scene.VisualEffects.Add(PressStart, EphemereGames.Core.Visual.VisualEffects.Fade(PressStart.Alpha, 255, 500, 1000))); VisualEffectsIds.Add(Scene.VisualEffects.Add(Commander, Core.Visual.VisualEffects.Fade(Commander.Alpha, 255, 0, 1000))); VisualEffectsIds.Add(Scene.VisualEffects.Add(Filter, Core.Visual.VisualEffects.Fade(Filter.Alpha, 100, 0, 500))); MovePathEffect mpe = new MovePathEffect() { StartAt = 0, PointAt = false, Delay = 0, Length = 10000, Progress = Core.Utilities.Effect<IPhysical>.ProgressType.Linear, InnerPath = new Path2D(new List<Vector2>() { new Vector2(-1920, -85), new Vector2(-1000, -85), new Vector2(-740, -85) }, new List<double>() { 0, 600, 1200 }) }; PhysicalEffectsIds.Add(Scene.PhysicalEffects.Add(Filter, mpe)); }