public override void Draw(RenderTarget target, RenderStates states) { target.Draw(SpriteIndex); /*RectangleShape mask = new RectangleShape(); * mask.FillColor = Color.Black; * mask.Position = new Vector2f(X + MaskX, Y + MaskY); * mask.Size = new Vector2f(MaskWidth, MaskHeight); * target.Draw(mask);*/ if (Punched) { EksedraSprite animeLines = new EksedraSprite(RunningEngine.Images["anime-lines"], new IntRect[] { new IntRect(0, 0, 1280 * 3 / 4, 720 * 3 / 4) }); animeLines.MoveTo( RunningEngine.ViewPort.Left + RunningEngine.ViewPort.Width / 2, RunningEngine.ViewPort.Top + RunningEngine.ViewPort.Height / 2); animeLines.Smooth = true; target.Draw(animeLines); } if (Timers[1] != -1) { Splash.MoveTo(X, Y); Splash.ImageIndex += (1.0f / 30.0f) * Splash.ImageSpeed; target.Draw(Splash); } }
public override void Init() { Tag = "Control"; RunningEngine.ViewPort.Width = 3 * 1280 / 4; RunningEngine.ViewPort.Height = 3 * 720 / 4; PlayButtonOff = new EksedraSprite(RunningEngine.Images["play_button"], new IntRect[] { new IntRect(0, 0, 512, 128) }); PlayButtonOn = new EksedraSprite(RunningEngine.Images["play_button"], new IntRect[] { new IntRect(0, 128, 512, 128) }); PlayButtonOff.MoveTo(1280 / 2, 720 / 2 + 64); PlayButtonOff.Smooth = true; PlayButtonOff.SetScale(0.5f, 0.5f); PlayButtonOn.MoveTo(1280 / 2, 720 / 2 + 64); PlayButtonOn.Smooth = true; PlayButtonOn.SetScale(0.5f, 0.5f); }