コード例 #1
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.TransparentBlack);

            //foreach (ModelMesh mesh in blueCube.Meshes)
            //{
            //    foreach(BasicEffect effect in mesh.Effects)
            //    {
            //        effect.AmbientLightColor = new Vector3(1.0f, 0, 0);
            //        effect.View = viewMatrix;
            //        effect.World = worldMatrix;
            //        effect.Projection = projectionMatrix;

            //    }
            //    mesh.Draw();
            //}

            // TODO: Add your drawing code here

            CubeManager.getCubeManager(this).Draw(gameTime);

            this.Window.Title = $"Pi Approximation: {Simulation.Pi}";

            base.Draw(gameTime);
        }
コード例 #2
0
ファイル: Simulation.cs プロジェクト: wii360ps/3dMonteCarloPi
 public Simulation(Game game, int seed)
 {
     rand    = new Random(seed);
     manager = CubeManager.getCubeManager(game);
 }