DrawsWorld
Introduction
Code Example
using FlatRedBall.Graphics;Sprite sprite = SpriteManager.AddSprite("redball.bmp");
sprite.ScaleX = sprite.ScaleY = 10;
// We'll use a global content manager if we expect the Camera to be around forever
Camera hudCamera = new Camera(FlatRedBallServices.GlobalContentManager);
SpriteManager.Cameras.Add(hudCamera);
hudCamera.SetSplitScreenViewport(Camera.SplitScreenViewport.FullScreen);
// Do this so the Camera doesn't draw the Sprite again!
hudCamera.DrawsWorld = false;
// Now, add a Text object to the HUD camera.
Text text = TextManager.AddText("Score: 1000");
text.X = -19f;
text.Y = 15;
//text.Scale = text.Spacing = 2;
//text.SetPixelPerfectScale(hudCamera);
TextManager.AddToLayer(text, hudCamera.Layer);
Last updated
Was this helpful?