Example #1
0
        //Rendering and calling upon render functiosn will occur here!
        public static void renderWorld()
        {
            player.setPosition(X, Y);
            camera.setCameraPosition(-X, -Y);

            GL.Uniform3(10, 12, Lights);
            GL.Uniform3(20, 12, LightColors);
            GL.Uniform1(9, 4);

            xx += 0.01f;

            World.RenderWorld(camera);
            YeenUtils.RenderPlayer(camera, player);
        }
Example #2
0
        public static void initializeObjects()
        {
            Texture.GenerateTextureArray(2);
            Texture.genTexture(0, @"Bin/textures/TEXTURE.png");
            Texture.genTexture(1, @"Bin/textures/player.png");

            Lights = new float[12]
            {
                1.0f, 1.0f, 1f,
                9.0f, 1.0f, 3f,
                1.0f, 9.0f, 4f,
                9.0f, 9.0f, 1f
            };

            LightColors = new float[12]
            {
                1.0f, 1.0f, 1f,
                1.0f, 0.7f, 0.3f,
                1.0f, 1.0f, 1f,
                9.0f, 9.0f, 1f
            };

            floor = new ITile(0);
            floor.setPosition(1, 1);

            Dimension = new IDimension(floor, 0.1f, new Vector3(0.0f, 0.0f, 0.0f));

            player = new Player.Player(1, true);

            World = new IWorld(Dimension);

            camera = new Camera(Renderer.Renderer.width, Renderer.Renderer.height);



            camera.setCameraPosition(1, 1);

            World.GenerateWorld();

            player.setPosition(-1, -1);
        }