public override void enterState() { title = new HUDText("Press 'A' to replay!", new Vector2(50, 50), customfont, Color.White); title2 = new HUDText("Press 'B' to select a different map!", new Vector2(50, 100), customfont, Color.White); RenderingEngine.UI.addText(title); RenderingEngine.UI.addText(title2); bg = new UniformBackground("bgs/dw", 0, 0); RenderingEngine.camera.setScale(Constants.DEBUG? 1366f / 1920f : 1); RenderingEngine.ambientLight = Color.White; RenderingEngine.camera.setPosition(Vector2.Zero); timer = Constants.TIMEREPLAY; }
public override void enterState() { int ndx = 0; title = new HUDText("Select a map to play!", new Vector2(50, 50), customfont, Color.White); RenderingEngine.UI.addText(title); maps = new List<HUDText>(); foreach (String s in Constants.mapnames) { maps.Add(new HUDText(s, new Vector2(100, 150 + 100 * ndx), customfont, Color.Gray)); RenderingEngine.UI.addText(maps[ndx++]); } maps[0].setColor(Color.LightGray); bg = new UniformBackground("bgs/dw", 0, 0); RenderingEngine.camera.setScale(Constants.DEBUG? 1366f / 1920f : 1); RenderingEngine.ambientLight = Color.White; RenderingEngine.camera.setPosition(Vector2.Zero); }
/// Removes the given background from the rendering engine /// </summary> /// <param name="bg">the background to remove</param> public void removeBackground(UniformBackground bg) { staticbgs.Remove(bg); }
/// <summary> /// Adds the given background to the rendering engine (so it can be rendered) /// </summary> /// <param name="bg">The background to be added</param> public void addBackground(UniformBackground bg) { staticbgs.Add(bg); }