Exemple #1
0
        static void LoadObjects()
        {
            w.setSkyBox(new SkyBox(new CubeMapTexture(c.defaultPath + "CubeMap/sky0", CubeMapType.None)));
            crosshairPosition = new Vector3f(3.0f, 1.0f, 0.0f);

            w.Add(new HUD(c.defaultPath));
            Vector3f va, vb, vc, vd;

            va = new Vector3f(-100.0f, 0.0f, -10.0f);
            vb = new Vector3f(100.0f, 0.0f, -10.0f);
            vc = new Vector3f(100.0f, 0.0f, 50.0f);
            vd = new Vector3f(-100.0f, 0.0f, 50.0f);
            w.Add(new GroundPlane(new BasicTexture(c.defaultPath + "Texture/Tile/chess0.jpg"), 70, 7, new Vector3f(0.0f, 0.0f, -5.0f), 200, 20.0f));

            w.Add(gun);
            w.Add(gun2);

            playerPosition = new Vector3f(0.0f, 1.0f, 0.0f);
            playerVelocity = new Vector3f();
            BasicTexture[] textures = new BasicTexture[8];
            for (int i = 1; i <= 8; i++)
            {
                textures[i - 1] = new BasicTexture(c.defaultPath + "How/Media/Girl/Move" + i + ".png");
            }
            player = new AnimatedQuad(textures, playerPosition, 1.0f, textures[0].Width() / textures[0].Height());
            w.Add(player);
            w.Add(new Quad(new BasicTexture(c.defaultPath + "Texture/Foilage/Vine with alpha.png"), new Vector3f(-100, 0.65f, 5.001f), 10.0f, 20.0f, 1.0f));
            w.Add(new BillboardedQuad(new BasicTexture(c.defaultPath + "Texture/Particle/crosshairs.png"), w.getActiveCamera(), crosshairPosition, new Vector2f(1.0f, 1.0f)));
        }
Exemple #2
0
        static void Initialize()
        {
            c            = new Configuration("config.dat");
            audioContext = new AudioContext(c);
            listener     = new Listener();

            w = new SDLWindow(c);
            w.Add(buttonAction);
        }