Пример #1
0
 /// <summary>
 /// 
 /// </summary>
 public override void Draw(RTSCamera camera)
 {
     // TODO: Add your drawing code here
     CopyMatrix(camera);
     DrawModel(tankBody, tankTexture, tankBodyTransform);
     DrawModel(tankTurret, tankTexture, tankTurretTransform);
     DrawModel(tankBarrel, tankTexture, tankBarrelTransform);
 }
Пример #2
0
 public virtual void Draw(RTSCamera camera)
 {
     CopyMatrix(camera);
     DrawModel(defaultModel,defaultTex,world);
 }
Пример #3
0
 protected void CopyMatrix(RTSCamera camera)
 {
     view = camera.ViewMatrix;
     projection = camera.ProjectionMatrix;
 }
Пример #4
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            rand = new Random();
            // TODO: Add your initialization logic here
            floor = new Box(0, 0, 0, worldSize, 1, worldSize);
            camera = new RTSCamera(this, new Vector3(0, 560, 0), 5,-10);

            reset();
            base.Initialize();
        }