protected override void LoadContent() { running = true; var pp = 0; colors = new Color[256]; for (int r = 0; r < 6; r++) { for (int g = 0; g < 6; g++) { for (int b = 0; b < 6; b++) { int rr = (r * 255 / 5); int gg = (g * 255 / 5); int bb = (b * 255 / 5); int mid = (rr * 30 + gg * 59 + bb * 11) / 100; int r1 = ((rr + mid * 1) / 2) * 230 / 255 + 10; int g1 = ((gg + mid * 1) / 2) * 230 / 255 + 10; int b1 = ((bb + mid * 1) / 2) * 230 / 255 + 10; colors[pp++] = new Color(r1, g1, b1); } } } //while (pp < 256) //{ // colors[pp++] = Color.Black; //} var spriteSheet = Content.Load<Texture2D>("Textures/icons"); screen = new Screen(WIDTH, HEIGHT, new SpriteSheet(spriteSheet)); lightScreen = new Screen(WIDTH, HEIGHT, new SpriteSheet(spriteSheet)); Sounds.Sound.Initialize(this.Content); spriteBatch = new SpriteBatch(GraphicsDevice); pixels = new Color[WIDTH * HEIGHT]; image = new Texture2D(GraphicsDevice, WIDTH, HEIGHT); input = new InputHandler(); resetGame(); setMenu(new TitleMenu()); }
public Key(InputHandler handler) { handler.keys.Add(this); }