コード例 #1
0
 public void Update(long elapsedMilliseconds)
 {
     foreach (var primitive in _primitives)
     {
         primitive.Rotation += new Vector3(1.0f, 10.0f, 1.0f) * (elapsedMilliseconds / 1000.0f);
         _renderer.AddCube(primitive);
     }
 }
コード例 #2
0
ファイル: World.cs プロジェクト: lm165678/c4g
 public void Update(long elapsedMilliseconds)
 {
     foreach (var cube in _cubes)
     {
         cube.Rotation += new Vector3(1.10f, 1.1f, 1.03f) * (elapsedMilliseconds / 1000.0f);
         _renderer.AddCube(cube);
     }
     _renderer.EndFrame();
 }
コード例 #3
0
ファイル: World.cs プロジェクト: lm165678/c4g
 public void Update(long elapsedMilliseconds)
 {
     foreach (var primitive in _primitives)
     {
         primitive.Rotation += new Vector3(1.0f, 10.0f, 1.0f) * (elapsedMilliseconds / 1000.0f);
         primitive.Color     = _colour;
         _renderer.AddCube(primitive);
     }
     _positionAndColourCoordinator.MoveNext();
 }
コード例 #4
0
        public void Update(long elapsedMilliseconds)
        {
            // TODO: Change the rotation of each of the cubes before adding them to the rendere so that the rotation depends on time.
            // to achieve this you generally multiply a Vector3 with a scalar that has some some or awareness
            // of the elapsed time

            foreach (var cube in _cubes)
            {
                _renderer.AddCube(cube);
            }
        }
コード例 #5
0
ファイル: World.cs プロジェクト: lm165678/c4g
        public void Update(long elapsedMilliseconds)
        {
            foreach (var primitive in _primitives)
            {
                primitive.Rotation += new Vector3(1.0f, 10.0f, 1.0f) * (elapsedMilliseconds / 1000.0f);
                primitive.Color     = _colour;
                _renderer.AddCube(primitive);
            }

            var keyboardState = Keyboard.GetState();

            if (keyboardState.IsKeyDown(Keys.A) && _lastState.IsKeyUp(Keys.A))
            {
                _channel.Insert(true);
            }
            _lastState = keyboardState;

            _kernel.Step();
        }