public Map() { last_playerPosition = new Vector2(42, 74); texture = ContentManager.Textures["map1"]; Vertex v1 = new Vertex(new Vector2(42, 74)); Vertex v2 = new Vertex(new Vector2(106, 74)); Vertex v3 = new Vertex(new Vector2(106, 10), Mode.level_1); Vertex v4 = new Vertex(new Vector2(170, 10)); Vertex v5 = new Vertex(new Vector2(233, 10), Mode.level_2); Vertex v6 = new Vertex(new Vector2(297, 10), Mode.level_3); Vertex v7 = new Vertex(new Vector2(361, 10)); Vertex v8 = new Vertex(new Vector2(361, 74), Mode.textures); Vertex v9 = new Vertex(new Vector2(297, 74), Mode.level_4); Vertex v10 = new Vertex(new Vector2(233, 74)); Vertex v11 = new Vertex(new Vector2(233, 138), Mode.songs_and_sfx); Vertex v12 = new Vertex(new Vector2(170, 138), Mode.main_screen); Vertex v13 = new Vertex(new Vector2(106, 138)); AddVertex(v1); AddVertex(v2); AddVertex(v3); AddVertex(v4); AddVertex(v5); AddVertex(v6); AddVertex(v7); AddVertex(v8); AddVertex(v9); AddVertex(v10); AddVertex(v11); AddVertex(v12); AddVertex(v13); AddLink(v1, v2); AddLink(v2, v3); AddLink(v3, v4); AddLink(v4, v5); AddLink(v5, v6); AddLink(v6, v7); AddLink(v7, v8); AddLink(v8, v9); AddLink(v9, v10); AddLink(v10, v5); AddLink(v10, v11); AddLink(v11, v12); AddLink(v12, v13); AddLink(v13, v2); targets = new CircularList <RenderTarget2D>(); for (int i = 0; i < 2; i++) { targets.Add(new RenderTarget2D(graphics.GraphicsDevice, graphics.GraphicsDevice.Viewport.Width, graphics.GraphicsDevice.Viewport.Height)); } iter = targets.GetEnumerator(); iter.MoveNext(); }
public Renderer(Scene scene, SpriteBatch spriteBatch, GraphicsDeviceManager graphics) { this.scene = scene; this.spriteBatch = spriteBatch; this.graphics = graphics; targets = new CircularList <RenderTarget2D>(); for (int i = 0; i < 2; i++) { targets.Add(new RenderTarget2D(graphics.GraphicsDevice, graphics.GraphicsDevice.Viewport.Width, graphics.GraphicsDevice.Viewport.Height)); } iter = targets.GetEnumerator(); iter.MoveNext(); }