Skip to content

Commit

Permalink
[docs] Use drawWidth and drawHeight in Getting Started
Browse files Browse the repository at this point in the history
[docs] Use drawWidth and drawHeight in Getting Started
  • Loading branch information
rougepied authored and eonarheim committed Apr 4, 2018
1 parent 2e98e60 commit 920b84d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ play. Actors are the primary way to draw things to the screen.
// Create an actor with x position of 150px,
// y position of 40px from the bottom of the screen,
// width of 200px, height and a height of 20px
var paddle = new ex.Actor(150, game.getDrawHeight() - 40, 200, 20);
var paddle = new ex.Actor(150, game.drawHeight - 40, 200, 20);
// Let's give it some color with one of the predefined
// color constants
Expand Down Expand Up @@ -147,7 +147,7 @@ event.
// If the ball collides with the right side
// of the screen reverse the x velocity
if (this.pos.x + (this.getWidth() / 2) > game.getDrawWidth()) {
if (this.pos.x + (this.getWidth() / 2) > game.drawWidth) {
this.vel.x *= -1;
}
Expand Down Expand Up @@ -197,7 +197,7 @@ layout and add them to the current scene.
var brickColor = [ex.Color.Violet, ex.Color.Orange, ex.Color.Yellow];
// Individual brick width with padding factored in
var brickWidth = game.getDrawWidth() / columns - padding - padding/columns; // px
var brickWidth = game.drawWidth / columns - padding - padding/columns; // px
var brickHeight = 30; // px
var bricks = [];
for (var j = 0; j < rows; j++) {
Expand Down

0 comments on commit 920b84d

Please sign in to comment.