public void StartReplaying(Game game) { game.Input = staticInput = new StaticInput(); state = ReplayState.Replaying; Game.Random = new Random(0); game.SpawnRandomizer = new Random(0); mainCharPositionReplay = new Common.Interpolator3(); groundPosition = new Common.Interpolator3(); planePosition = new Common.Interpolator3(); }
public RendererSettingsController() { PercentageLightIncrease = new Common.Interpolator { Value = Program.DefaultSettings.RendererSettings.PercentageLightIncrease, //ChangeSpeed = 0.05f, }; ColorChannelPercentageIncrease = new Common.Interpolator3 { Value = Program.DefaultSettings.RendererSettings.ColorChannelPercentageIncrease, //ChangeSpeed = 0.2f, }; }
public RendererSettingsController() { PercentageLightIncrease = new Common.Interpolator { Value = Program.DefaultSettings.RendererSettings.PercentageLightIncrease, //ChangeSpeed = 0.05f, }; ColorChannelPercentageIncrease = new Common.Interpolator3 { Value = Program.DefaultSettings.RendererSettings.ColorChannelPercentageIncrease, //ChangeSpeed = 0.2f, }; }
protected override void PerformingTick() { base.PerformingTick(); if (TargetUnit.State != UnitState.Alive) { TryEndPerform(true); return; } if (demonSmokeCharge == null) { Game.Instance.Scene.Add(demonSmokeCharge = new Effects.DemonSmoke1Small()); } else { TargetUnit.Hit(Performer, 50, AttackType.Ethereal, this); if (!second) { Performer.Heal(Performer, 100); } second = false; demonSmokeCharge.Stop(); demonSmokeTransport = demonSmokeCharge; demonSmokeCharge = new Client.Game.Map.Effects.DemonSmoke1Small(); Game.Instance.Scene.Add(demonSmokeCharge); transport = new Common.Interpolator3 { Value = TargetUnit.Translation }; transport.AddKey(transportKey = new Common.InterpolatorKey <Vector3> { Time = TickPeriod, TimeType = Common.InterpolatorKeyTimeType.Relative, Value = Performer.Translation }); if (TargetUnit.State != UnitState.Alive) { new DemonLinkExplosion { Performer = Performer, Mediator = TargetUnit, TargetEntity = TargetUnit, TargetPosition = TargetUnit.Position }.TryStartPerform(); } } }
public void StartReplaying(Game game) { game.Input = staticInput = new StaticInput(); state = ReplayState.Replaying; Game.Random = new Random(0); game.SpawnRandomizer = new Random(0); mainCharPositionReplay = new Common.Interpolator3(); groundPosition = new Common.Interpolator3(); planePosition = new Common.Interpolator3(); }
protected override void StartEffectivePerform() { base.StartEffectivePerform(); oldCamera = (Graphics.LookatCamera)Game.Instance.Camera; camera = new Graphics.LookatCartesianCamera { AspectRatio = oldCamera.AspectRatio, FOV = oldCamera.FOV, ZFar = oldCamera.ZFar }; Game.Instance.Camera = camera; position = new Common.Interpolator3(); lookat = new Common.Interpolator3(); up = new Common.Interpolator3(); if (StartCameraAngle != null) { position.Value = Game.Instance.Map.GetCameraAngle(StartCameraAngle).Position; lookat.Value = Game.Instance.Map.GetCameraAngle(StartCameraAngle).Lookat; up.Value = Game.Instance.Map.GetCameraAngle(StartCameraAngle).Up; } else { position.Value = oldCamera.Position; lookat.Value = oldCamera.Lookat; up.Value = oldCamera.Up; } var endPositionKey = new Common.InterpolatorKey<Vector3> { Time = EffectiveDuration - EndDelay, TimeType = Common.InterpolatorKeyTimeType.Relative, }; var endLookatKey = new Common.InterpolatorKey<Vector3> { Time = EffectiveDuration - EndDelay, TimeType = Common.InterpolatorKeyTimeType.Relative, }; var endUpKey = new Common.InterpolatorKey<Vector3> { Time = EffectiveDuration - EndDelay, TimeType = Common.InterpolatorKeyTimeType.Relative, }; if (EndCameraAngle != null) { endPositionKey.Value = Game.Instance.Map.GetCameraAngle(EndCameraAngle).Position; endLookatKey.Value = Game.Instance.Map.GetCameraAngle(EndCameraAngle).Lookat; endUpKey.Value = Game.Instance.Map.GetCameraAngle(EndCameraAngle).Up; } else { endPositionKey.Value = oldCamera.Position; endLookatKey.Value = oldCamera.Lookat; endUpKey.Value = oldCamera.Up; } position.AddKey(endPositionKey); lookat.AddKey(endLookatKey); up.AddKey(endUpKey); ((Graphics.SortedTestSceneRendererConnector)Game.Instance.SceneRendererConnector).ForceCull = true; ((Graphics.SortedTestSceneRendererConnector)Game.Instance.SceneRendererConnector).ForceShadowCull = true; }
protected override void StartEffectivePerform() { base.StartEffectivePerform(); oldCamera = (Graphics.LookatCamera)Game.Instance.Camera; camera = new Graphics.LookatCartesianCamera { AspectRatio = oldCamera.AspectRatio, FOV = oldCamera.FOV, ZFar = oldCamera.ZFar }; Game.Instance.Camera = camera; position = new Common.Interpolator3(); lookat = new Common.Interpolator3(); up = new Common.Interpolator3(); for(int i=0; i < Setup.Count; i++) { var v = Setup[i]; if (v.CameraAngle == "GameCamera") { position.AddKey(new Common.InterpolatorKey<Vector3> { TimeType = Common.InterpolatorKeyTimeType.Relative, Time = v.Time, ValueProvider = () => oldCamera.Position //LeftControlPoint = Vector3.Zero, //RightControlPoint = Vector3.Zero, //Type = Common.InterpolatorKeyType.CubicBezier }); lookat.AddKey(new Common.InterpolatorKey<Vector3> { TimeType = Common.InterpolatorKeyTimeType.Relative, Time = v.Time, ValueProvider = () => oldCamera.Lookat, //LeftControlPoint = Vector3.Zero, //RightControlPoint = Vector3.Zero, //Type = Common.InterpolatorKeyType.CubicBezier }); up.AddKey(new Common.InterpolatorKey<Vector3> { TimeType = Common.InterpolatorKeyTimeType.Relative, Time = v.Time, ValueProvider = () => oldCamera.Up, //LeftControlPoint = Vector3.Zero, //RightControlPoint = Vector3.Zero, //Type = Common.InterpolatorKeyType.CubicBezier }); } else { var angle = Game.Instance.Map.GetCameraAngle(v.CameraAngle); position.AddKey(new Common.InterpolatorKey<Vector3> { TimeType = Common.InterpolatorKeyTimeType.Relative, Time = v.Time, Value = angle.Position, //LeftControlPoint = Vector3.Zero, //RightControlPoint = Vector3.Zero, //Type = Common.InterpolatorKeyType.CubicBezier }); lookat.AddKey(new Common.InterpolatorKey<Vector3> { TimeType = Common.InterpolatorKeyTimeType.Relative, Time = v.Time, Value = angle.Lookat, //LeftControlPoint = Vector3.Zero, //RightControlPoint = Vector3.Zero, //Type = Common.InterpolatorKeyType.CubicBezier }); up.AddKey(new Common.InterpolatorKey<Vector3> { TimeType = Common.InterpolatorKeyTimeType.Relative, Time = v.Time, Value = angle.Up, //LeftControlPoint = Vector3.Zero, //RightControlPoint = Vector3.Zero, //Type = Common.InterpolatorKeyType.CubicBezier }); } } }
protected override void PerformingTick() { base.PerformingTick(); if (TargetUnit.State != UnitState.Alive) { TryEndPerform(true); return; } if (demonSmokeCharge == null) Game.Instance.Scene.Add(demonSmokeCharge = new Effects.DemonSmoke1Small()); else { TargetUnit.Hit(Performer, 50, AttackType.Ethereal, this); if(!second) Performer.Heal(Performer, 100); second = false; demonSmokeCharge.Stop(); demonSmokeTransport = demonSmokeCharge; demonSmokeCharge = new Client.Game.Map.Effects.DemonSmoke1Small(); Game.Instance.Scene.Add(demonSmokeCharge); transport = new Common.Interpolator3 { Value = TargetUnit.Translation }; transport.AddKey(transportKey = new Common.InterpolatorKey<Vector3> { Time = TickPeriod, TimeType = Common.InterpolatorKeyTimeType.Relative, Value = Performer.Translation }); if (TargetUnit.State != UnitState.Alive) { new DemonLinkExplosion { Performer = Performer, Mediator = TargetUnit, TargetEntity = TargetUnit, TargetPosition = TargetUnit.Position }.TryStartPerform(); } } }