コード例 #1
0
ファイル: MyGame.cs プロジェクト: baldercollaborator/Balder
		public override void LoadContent()
		{
			
			var mesh = ContentManager.Load<Mesh>("audi.ASE");
			//mesh.Position.X = -30;
			mesh.World = Matrix.CreateScale(new Vector(10f, 10f, 10f));
			Scene.AddNode(mesh);

			_lightSprite = ContentManager.Load<Sprite>("sun.png");
			Scene.AddNode(_lightSprite);


			var sprite = ContentManager.Load<Sprite>("recycle.png");
			sprite.Position = new Vector(-10,0,0);
			//Scene.AddNode(sprite);

			Display.BackgroundColor = Color.FromArgb(0xff, 0, 0, 0);

			var cylinder = ContentManager.CreateCylinder(10f, 20f, 8, 1);

			light = new OmniLight();
            light.Range = 3.0f;
			light.Position.X = 0;
			light.Position.Y = 0;
			light.Position.Z = -30;
            light.ColorDiffuse = Color.FromArgb(0xff, 0x1f, 0x1f, 0x6f);
            light.ColorSpecular = Color.FromArgb(0xff, 0xff, 0xff, 0xff);
            light.ColorAmbient = Color.FromArgb(0xff, 0, 0x5f, 0);
			Scene.AddNode(light);
		}
コード例 #2
0
ファイル: Content.xaml.cs プロジェクト: petriw/Balder
        private void Game_Initialize(Game game)
        {
            game.ContentManager.AssetsRoot = "Samples/Programatic/Materials/Assets";

            var light = new OmniLight
                            {
                                Ambient = Colors.Black,
                                Diffuse = Colors.Black,
                                Specular = Colors.White,
                                Position = new Coordinate(0, 400, 0)
                            };
            game.Scene.AddNode(light);

            game.Camera.Position.Set(0,80,-150);
            game.Camera.Target.Set(0,10,0);
        }
コード例 #3
0
ファイル: MyGame.cs プロジェクト: petriw/Balder
        public override void OnInitialize()
        {
            ContentManager.AssetsRoot = "Samples/Programatic/Teapot/Assets";

            var light = new OmniLight();
            light.Diffuse = Color.FromArgb(0xff, 255, 121, 32);
            light.Specular = Color.FromArgb(0xff, 0xff, 0xff, 0xff);
            light.Ambient = Color.FromArgb(0xff, 0x7f, 0x3f, 0x10);

            light.Position.X = -100;
            light.Position.Y = 0;
            light.Position.Z = 0;
            Scene.AddNode(light);

            Camera.Position.X = 0;
            Camera.Position.Y = 20;
            Camera.Position.Z = -100;

            Camera.Target.Y = 0;

            base.OnInitialize();
        }
コード例 #4
0
ファイル: MyGame.cs プロジェクト: tekbob27/Balder
		public override void LoadContent()
		{
			var mesh = ContentManager.Load<Mesh>("pumpkin.ASE");
			Scene.AddNode(mesh);



			//mesh.World = Matrix.CreateScale(new Vector(10f, 10f, 10f));

			_lightSprite = ContentManager.Load<Sprite>("sun.png");
			//Scene.AddNode(_lightSprite);

			Display.BackgroundColor = Color.FromArgb(0xff, 0, 0, 0);

			light = new OmniLight();
            light.Range = 2.0f;
			light.Position.X = 0;
			light.Position.Y = 0;
			light.Position.Z = -30;
            light.ColorDiffuse = Color.FromArgb(0xff, 255, 121, 32);
            light.ColorSpecular = Color.FromArgb(0xff, 0xff, 0xff, 0xff);
            light.ColorAmbient = Color.FromArgb(0xff, 0x7f, 0x3f, 0x10);
			Scene.AddNode(light);
		}