コード例 #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            models.Add(new CModel(Content.Load <Model>("freak"), new Vector3(40, 50, 50), Vector3.Zero, false, new Vector3(10), GraphicsDevice));

            models.Add(new CModel(Content.Load <Model>("new1"), Vector3.Zero, Vector3.Zero, false, new Vector3(200f), GraphicsDevice));

            camera = new ChaseCamera(new Vector3(0, 50, 300), new Vector3(0, 50, 0), Vector3.Zero, GraphicsDevice);
            ((ChaseCamera)camera).Move(models[0].Position, models[0].Rotation, new Vector3(0, 0, 0));

            map.LoadContent(graphics, Content);

            boner = new BoneModel(Content.Load <Model>("freak3"));

            bB.Min = new Vector3(0, 0, 100);
            bB.Max = new Vector3(100, 100, 200);

            tile = new Tile(Content.Load <Texture2D>("CylinderSkin"), graphics, new Vector3(0, 0, 100), new Vector3(100, 100, 100));
        }
コード例 #2
0
ファイル: Game1.cs プロジェクト: Woodje/3DGame
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            models.Add(new CModel(Content.Load<Model>("freak"), new Vector3(40, 50, 50), Vector3.Zero, false, new Vector3(10), GraphicsDevice));

            models.Add(new CModel(Content.Load<Model>("new1"), Vector3.Zero, Vector3.Zero, false, new Vector3(200f), GraphicsDevice));

            camera = new ChaseCamera(new Vector3(0, 50, 300), new Vector3(0, 50, 0), Vector3.Zero, GraphicsDevice);
            ((ChaseCamera)camera).Move(models[0].Position, models[0].Rotation, new Vector3(0, 0, 0));

            map.LoadContent(graphics, Content);

            boner = new BoneModel(Content.Load<Model>("freak3"));

            bB.Min = new Vector3(0, 0, 100);
            bB.Max = new Vector3(100, 100, 200);

            tile = new Tile(Content.Load<Texture2D>("CylinderSkin"), graphics, new Vector3(0, 0, 100), new Vector3(100, 100, 100));
        }