static LPC() { FrameTime = SFML.System.Time.FromMilliseconds(100); IdleLoop = new LoopingAnimation(FrameTime, (13 * 10), 1); WalkUp = new LoopingAnimation(FrameTime, (13 * 8), 9); WalkDown = new LoopingAnimation(FrameTime, (13 * 10), 9); WalkLeft = new LoopingAnimation(FrameTime, (13 * 9), 9); WalkRight = new LoopingAnimation(FrameTime, (13 * 11), 9); SlashUp = new Animation(FrameTime, (13 * 12), 6); SlashUpLoop = new LoopingAnimation(FrameTime, (13 * 12)); SlashDown = new Animation(FrameTime, (13 * 14), 6); SlashDownLoop = new LoopingAnimation(FrameTime, (13 * 14), 6); SlashLeft = new Animation(FrameTime, (13 * 13), 6); SlashLeftLoop = new LoopingAnimation(FrameTime, (13 * 13), 6); SlashRight = new Animation(FrameTime, (13 * 15), 6); SlashRightLoop = new LoopingAnimation(FrameTime, (13 * 15), 6); ThrustUp = new Animation(FrameTime, 13 * 4, 8); ThrustUpLoop = new LoopingAnimation(ThrustUp); ThrustDown = new Animation(FrameTime, 13 * 6, 8); ThrustDownLoop = new LoopingAnimation(ThrustDown); ThrustLeft = new Animation(FrameTime, 13 * 5, 8); ThrustLeftLoop = new LoopingAnimation(ThrustLeft); ThrustRight = new Animation(FrameTime, 13 * 7, 8); ThrustRightLoop = new LoopingAnimation(ThrustRight); ShootUp = new Animation(FrameTime, (13 * 16), 13); ShootUpLoop = new LoopingAnimation(ShootUp); ShootDown = new Animation(FrameTime, (13 * 18), 13); ShootDownLoop = new LoopingAnimation(ShootDown); ShootLeft = new Animation(FrameTime, (13 * 17), 13); ShootLeftLoop = new LoopingAnimation(ShootLeft); ShootRight = new Animation(FrameTime, (13 * 19), 13); ShootRightLoop = new LoopingAnimation(ShootRight); SpellcastUp = new Animation(FrameTime, 0, 7); SpellcastUpLoop = new LoopingAnimation(SpellcastUp); SpellcastDown = new Animation(FrameTime, 13 * 1, 7); SpellcastDownLoop = new LoopingAnimation(SpellcastDown); SpellcastLeft = new Animation(FrameTime, 13 * 2, 7); SpellcastLeftLoop = new LoopingAnimation(SpellcastLeft); SpellcastRight = new Animation(FrameTime, 13 * 3, 7); SpellcastRightLoop = new LoopingAnimation(SpellcastRight); StandardFrameHelper = new Graphics.Texels.FrameHelper(64, 64); OversizedFrameHelper = new Graphics.Texels.FrameHelper(64, 64); }
private void UpdateLoopingAnimation(double ratio) { if (LoopingAnimation == null) { return; } if (!isDeployed) { return; } if (!IsEnabled) { if (!Initialized || ShutdownAnimation == null || LoopingAnimation.IsMoving()) { return; } if (AnimationStarted < 0) { AnimationStarted = Planetarium.GetUniversalTime(); ShutdownAnimation.ToggleAction(new KSPActionParam(KSPActionGroup.Custom01, KSPActionType.Activate)); } else if (!ShutdownAnimation.IsMoving()) { ShutdownAnimation.ToggleAction(new KSPActionParam(KSPActionGroup.Custom01, KSPActionType.Deactivate)); Initialized = false; isDeployed = true; } return; } if (!LoopingAnimation.IsMoving()) { LoopingAnimation.Toggle(); } }
public Dot() { Animation = new LoopingAnimation("gfx\\dot\\Dot{0}", 5, 150); SetDefaults(); }