Skip to content

Commit

Permalink
Merge pull request #5 from gameclosure/devkit2
Browse files Browse the repository at this point in the history
Devkit2
  • Loading branch information
collingreen committed Nov 25, 2014
2 parents 44652d9 + 54f3a22 commit af33c13
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build/
sdk
modules
.DS_Store
.version
.version
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
Your first game using the Game Closure SDK.
#Your first game using the [Game Closure SDK](http://gameclosure.com).

A detailed explanation of the game code can be found in the [Game Walk-Through Guide](http://doc.gameclosure.com/guide/game-walkthrough.html).
![WhackThatMole](http://storage.googleapis.com/devkit-example-games/whackthatmole/whackthatmole_screenshot.png)

A detailed explanation of the game code can be found in the
[Game Walk-Through Guide](http://docs.gameclosure.com/guide/game-walkthrough.html).

##Prerequisites:
You need devkit installed to run this game locally. Please follow the devkit
installation instructions.


##Quick Start:

Clone this game:
`git clone [email protected]:gameclosure/whack-that-mole whackthatmole`
Change into the game directory:
`cd whackthatmole`

Add Devkit to the project (and register with the simulator)
`devkit install`

That's it! Run the simulator and open the WhackThatMole project.

##Play the Game:
[Play in the
Browser](http://storage.googleapis.com/devkit-example-games/whackthatmole/index.html)
14 changes: 9 additions & 5 deletions src/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,21 @@ exports = Class(GC.Application, function () {
var titlescreen = new TitleScreen(),
gamescreen = new GameScreen();

this.view.style.backgroundColor = '#30B040';
this.view.style.backgroundColor = '#008a42';

//Add a new StackView to the root of the scene graph

// Create a stackview of size 320x480, then scale it to fit horizontally
// Add a new StackView to the root of the scene graph
var rootView = new StackView({
superview: this,
x: device.width / 2 - 160,
y: device.height / 2 - 240,
// x: device.width / 2 - 160,
// y: device.height / 2 - 240,
x: 0,
y: 0,
width: 320,
height: 480,
clip: true,
backgroundColor: '#37B34A'
scale: device.width / 320
});

rootView.push(titlescreen);
Expand Down
1 change: 0 additions & 1 deletion src/GameScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ exports = Class(ui.View, function (supr) {
y: 0,
width: 320,
height: 480,
backgroundColor: '#37B34A'
});

supr(this, 'init', [opts]);
Expand Down

0 comments on commit af33c13

Please sign in to comment.