Example #1
0
        //        GraphicsDeviceManager graphics;
        public ConstructionPrencinct(Game1 game)
            : base(game)
        {
            camera = game.camera;

            // TODO: Construct any child components here
        }
Example #2
0
        public void Draw(Camera camera)
        {
            Matrix[] transofrms = new Matrix[model.Bones.Count];
            model.CopyAbsoluteBoneTransformsTo(transofrms);

            foreach (ModelMesh mesh in model.Meshes) {
                foreach (BasicEffect be in mesh.Effects) {
                    be.EnableDefaultLighting();
                    be.Projection = camera.projection;
                    be.View = camera.view;
                    be.World = GetWorld() * mesh.ParentBone.Transform;
                }
                mesh.Draw();
            }
        }