コード例 #1
0
ファイル: Tank.cs プロジェクト: bh679/CSCI35-Ass4-TeamBrennan
 /// <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();
        }