protected override void OnLoad(Microsoft.Xna.Framework.Content.ContentManager content, Microsoft.Xna.Framework.Graphics.GraphicsDevice gd) { Overlay = new DrawableRectangle(new GREATLib.Rect(0, 0, screenService.GameWindowSize.X, screenService.GameWindowSize.Y), Color.White); Overlay.Alpha = 0f; AddChild(Overlay); AddChild(Message = new DrawableLabel(), 2); Message.Scale = new Vector2(2f); Message.RelativeOrigin = new Vector2(0.5f); Message.SetPositionInScreenPercent(50, 50); base.OnLoad(content, gd); }
protected override void OnLoad(Microsoft.Xna.Framework.Content.ContentManager content, Microsoft.Xna.Framework.Graphics.GraphicsDevice gd) { RedRectangle = new DrawableRectangle(new GREATLib.Rect(0, 0, screenService.GameWindowSize.X, screenService.GameWindowSize.Y), Color.Red); RedRectangle.Alpha = 0f; AddChild(RedRectangle); DrawableLabel deathMessage = new DrawableLabel(); deathMessage.Text = "You died!"; deathMessage.Scale = new Vector2(2f); deathMessage.RelativeOrigin = new Vector2(0.5f); deathMessage.SetPositionInScreenPercent(50, 40); AddChild(deathMessage, 2); DeathTimer = new DrawableLabel(); DeathTimer.Text = DeathDuration.Seconds.ToString(); DeathTimer.Scale = new Vector2(2f); DeathTimer.RelativeOrigin = new Vector2(0.5f); DeathTimer.SetPositionInScreenPercent(50, 50); AddChild(DeathTimer, 2); }