MoveBy Examples Shape myShape = ...;
// Move the shape 20 pixels to the right // myShape.MoveBy( Vec2D( 20.0, 0.0 )); // Move the shape 100 pixels to the left and 150 pixels down // myShape.MoveBy( Vec2D( -100.0, 150.0 )); // Move the shape the same amount as above // // while taking the game speed regulation in account // float deltaTime = FpsCounter::GetDeltaTime(); myShape.MoveBy( deltaTime * Vec2D( -100.0, 150.0 )); Other functions of the class Shape
Questions about MoveBy? Click here. |