コード例 #1
0
ファイル: Game1.cs プロジェクト: sp-alex-osou/KDTree
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            camera = new FreeLookCamera(this);
            cameraHandler = new CameraHandler(this);
            Cubes = new Cubes(this);

            Components.Add(camera);
            Components.Add(cameraHandler);
            Components.Add(Cubes);

            Services.AddService(typeof(ICameraService), camera);
        }
コード例 #2
0
ファイル: Safari.cs プロジェクト: sp-alex-osou/Safari
        public Safari()
        {
            graphics = new GraphicsDeviceManager(this);
            //graphics.PreferredBackBufferWidth = 1366;
            //graphics.PreferredBackBufferHeight = 768;
            //graphics.IsFullScreen = true;

            Content.RootDirectory = "Content";

            // Komponenten erstellen
            camera = new FreeLookCamera(this);
            ground = new Ground(this);
            lights = new Lights(this);
            skybox = new Skybox(this);
            tigers = new Tigers(this);
            cubes = new Cubes(this);
            ray = new Line(this);

            cameraTracker = new CameraTracker(this, camera);
            cameraHandler = new CameraHandler(this, camera);

            // Komponenten zur Liste hinzufügen
            Components.Add(cameraTracker);
            Components.Add(cameraHandler);
            Components.Add(camera);
            Components.Add(skybox);
            Components.Add(lights);
            Components.Add(tigers);
            Components.Add(ground);
            Components.Add(cubes);
            Components.Add(ray);

            // Services zur Liste hinzufügen
            Services.AddService(typeof(ICameraService), camera);
            Services.AddService(typeof(ILightService), lights);

            // Antialiasing aktivieren
            graphics.PreferMultiSampling = true;
        }