public InGame(int race) { SoundManager.Stop(); Players[0] = new PC(race); PlayerList.AddFirst(Players[0]); HUDs[0] = new HUD(Players[0], HUD.Corner.TOPLEFT); Map = new ObliqueMap(@"maps\testmap.xml", CastleSpire.BaseWidth, CastleSpire.BaseHeight); Lightmap = new LightMap(CastleSpire.BaseWidth, CastleSpire.BaseHeight); FloorItems = new LinkedList <Item>(); TotalLosOverlay = new RenderTarget2D(Renderer.GraphicsDevice, CastleSpire.BaseWidth, CastleSpire.BaseHeight); LosTemp = new Color[CastleSpire.BaseWidth * CastleSpire.BaseHeight]; PlayerLosOverlay = new Texture2D[4]; for (int i = 0; i != 4; i++) { PlayerLosOverlay[i] = new Texture2D(Renderer.GraphicsDevice, CastleSpire.BaseWidth, CastleSpire.BaseHeight); } L = new Light(.1f, .1f, .2f, 50, 50, 50); Lightmap.AddLight(L); Lightmap.AddLight(new Light(.1f, .0f, .0f, 300, 100, 100)); Lightmap.AddLight(new Light(.0f, .0f, .1f, 400, 200, 100)); Lightmap.AddLight(new Light(.0f, .1f, .0f, 500, 300, 100)); Lightmap.AddLight(new Light(.3f, .0f, .3f, 100, 100, 50)); Lightmap.AddLight(new Light(.3f, .3f, .0f, 200, 150, 50)); Lightmap.AddLight(new Light(.0f, .3f, .3f, 300, 200, 50)); Lightmap.AddLight(new Light(.5f, .5f, .5f, 300, 600, 70)); Clock = new Clock(); FloorItems.AddFirst(new Item(@"items\melee\axe.xml", 300, 300)); SoundManager.Play("night.ogg", true); }
public InGame(int race) { SoundManager.Stop(); Players[0] = new PC(race); PlayerList.AddFirst(Players[0]); HUDs[0] = new HUD(Players[0], HUD.Corner.TOPLEFT); Map = new ObliqueMap(@"maps\testmap.xml", CastleSpire.BaseWidth, CastleSpire.BaseHeight); Lightmap = new LightMap(CastleSpire.BaseWidth, CastleSpire.BaseHeight); FloorItems = new LinkedList<Item>(); TotalLosOverlay = new RenderTarget2D(Renderer.GraphicsDevice, CastleSpire.BaseWidth, CastleSpire.BaseHeight); LosTemp = new Color[CastleSpire.BaseWidth * CastleSpire.BaseHeight]; PlayerLosOverlay = new Texture2D[4]; for (int i = 0; i != 4; i++) { PlayerLosOverlay[i] = new Texture2D(Renderer.GraphicsDevice, CastleSpire.BaseWidth, CastleSpire.BaseHeight); } L = new Light(.1f, .1f, .2f, 50, 50, 50); Lightmap.AddLight(L); Lightmap.AddLight(new Light(.1f, .0f, .0f, 300, 100, 100)); Lightmap.AddLight(new Light(.0f, .0f, .1f, 400, 200, 100)); Lightmap.AddLight(new Light(.0f, .1f, .0f, 500, 300, 100)); Lightmap.AddLight(new Light(.3f, .0f, .3f, 100, 100, 50)); Lightmap.AddLight(new Light(.3f, .3f, .0f, 200, 150, 50)); Lightmap.AddLight(new Light(.0f, .3f, .3f, 300, 200, 50)); Lightmap.AddLight(new Light(.5f, .5f, .5f, 300, 600, 70)); Clock = new Clock(); FloorItems.AddFirst(new Item(@"items\melee\axe.xml",300,300)); SoundManager.Play("night.ogg", true); }