Esempio n. 1
0
        public Settings()
        {
            Shader plainShader = new Shader.Plain(new Color8(0, 0, 0), new Color8(0, 0, 0), ' ');
            Image  plainImage  = new Image.Rectangle(plainShader, new Vector2d16(600, 300), 0);

            Shader logoShader = new Shader.TextureSymbol(ResourceLoader.LoadResource <Atlas16>(@"Textures\mainMenu.bms"), new Vector2d16(0, 6), new Vector2d16(47, 11));
            Image  logo       = new Image.Rectangle(logoShader, new Vector2d16(51, 5), 1);

            Image decoration = new Image.Rectangle(new Shader.RichText(new string[] { "|", "|", "|", "|", "|" }, new Color8(255, 255, 255)), new Vector2d16(1, 5), 200);

            Shader cursorShader = new Shader.RichText("> |", new Color8(0, 0, 255));
            Image  cursor       = new Image.Rectangle(cursorShader, new Vector2d16(3, 1), 127);

            Shape circle = new Shape.Circle(1);

            var tmp = new GameObject[]
            {
                new VisualObject(new Vector2d16(-100, -50), plainImage),

                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 25, Config.screenHeight / 5), logo),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 25, Config.screenHeight / 5 + 8), decoration),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 24, Config.screenHeight / 5 + 8), graphics),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 24, Config.screenHeight / 5 + 10), controls),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 24, Config.screenHeight / 5 + 12), back)
            };

            map  = new Map("Test", Renderer.Dimensions, 0, tmp);
            hero = new KinematicObject(new Vector2d16(Config.screenWidth / 2 - 27, Config.screenHeight / 5 + 8), circle, cursor);
        }
Esempio n. 2
0
        public SettingsControlls()
        {
            Shader plainShader = new Shader.Plain(new Color8(0, 0, 0), new Color8(0, 0, 0), ' ');
            Image  plainImage  = new Image.Rectangle(plainShader, new Vector2d16(600, 300), 0);

            Shader logoShader = new Shader.TextureSymbol(ResourceLoader.LoadResource <Atlas16>(@"Textures\mainMenu.bms"), new Vector2d16(0, 6), new Vector2d16(47, 11));
            Image  logo       = new Image.Rectangle(logoShader, new Vector2d16(51, 5), 1);

            Image graphics = new Image.Rectangle(new Shader.RichText("Graphics", new Color8(255, 255, 255)), new Vector2d16(8, 1), 200);
            Image controls = new Image.Rectangle(new Shader.RichText("Controls", new Color8(0, 0, 255)), new Vector2d16(8, 1), 200);
            Image backOld  = new Image.Rectangle(new Shader.RichText("Back", new Color8(255, 255, 255)), new Vector2d16(4, 1), 200);

            Image oldDecoration = new Image.Rectangle(new Shader.RichText(new string[] { "|", "|", "|", "|", "|" }, new Color8(255, 255, 255)), new Vector2d16(1, 5), 200);
            Image oldCursor     = new Image.Rectangle(new Shader.RichText(new string[] { "> |" }, new Color8(0, 0, 255)), new Vector2d16(3, 1), 200);

            Image decoration  = new Image.Rectangle(new Shader.RichText(new string[] { "|", "|", "|", "|", "|", "|", "|", "•", "•", "•", "|", "|", "|" }, new Color8(255, 255, 255)), new Vector2d16(1, 14), 200);
            Image decoration2 = new Image.Rectangle(new Shader.RichText(new string[] { "|", "|", "|", "|", "|", "|", "|" }, new Color8(255, 255, 255)), new Vector2d16(1, 7), 200);

            Shader cursorShader = new Shader.RichText("> |", new Color8(0, 0, 255));
            Image  cursor       = new Image.Rectangle(cursorShader, new Vector2d16(3, 1), 127);
            Image  cursorOld    = new Image.Rectangle(cursorShader, new Vector2d16(3, 1), 201);

            Shape circle = new Shape.Circle(1);

            var tmp = new GameObject[]
            {
                new VisualObject(new Vector2d16(-100, -50), plainImage),

                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 25, Config.screenHeight / 5), logo),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 25, Config.screenHeight / 5 + 8), oldDecoration),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 24, Config.screenHeight / 5 + 8), graphics),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 24, Config.screenHeight / 5 + 10), controls),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 24, Config.screenHeight / 5 + 12), backOld),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 27, Config.screenHeight / 5 + 10), cursorOld),

                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 5, Config.screenHeight / 5 + 8), decoration),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 + 13, Config.screenHeight / 5 + 8), decoration2),

                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 4, Config.screenHeight / 5 + 8), moveUp),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 + 7, Config.screenHeight / 5 + 8), moveUpValue),

                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 4, Config.screenHeight / 5 + 10), moveDown),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 + 7, Config.screenHeight / 5 + 10), moveDownValue),

                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 4, Config.screenHeight / 5 + 12), moveLeft),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 + 7, Config.screenHeight / 5 + 12), moveLeftValue),

                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 4, Config.screenHeight / 5 + 14), moveRight),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 + 7, Config.screenHeight / 5 + 14), moveRightValue),

                new VisualObject(new Vector2d16(Config.screenWidth / 2 + 14, Config.screenHeight / 5 + 8), moveAltUp),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 + 35, Config.screenHeight / 5 + 8), moveAltUpValue),

                new VisualObject(new Vector2d16(Config.screenWidth / 2 + 14, Config.screenHeight / 5 + 10), moveAltDown),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 + 35, Config.screenHeight / 5 + 10), moveAltDownValue),

                new VisualObject(new Vector2d16(Config.screenWidth / 2 + 14, Config.screenHeight / 5 + 12), moveAltLeft),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 + 35, Config.screenHeight / 5 + 12), moveAltLeftValue),

                new VisualObject(new Vector2d16(Config.screenWidth / 2 + 14, Config.screenHeight / 5 + 14), moveAltRight),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 + 35, Config.screenHeight / 5 + 14), moveAltRightValue),


                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 4, Config.screenHeight / 5 + 18), save),
                new VisualObject(new Vector2d16(Config.screenWidth / 2 - 4, Config.screenHeight / 5 + 20), back)
            };

            map  = new Map("Test", Renderer.Dimensions, 0, tmp);
            hero = new KinematicObject(new Vector2d16(Config.screenWidth / 2 - 7, Config.screenHeight / 5 + 8), circle, cursor);
        }