This repo contains the code of a simple cocos2d-X game. The game is called 2Bunnies and is a clone of 2 Cars.
TASKS.md
to get an actual game.
The code for the game is contained in the src
folder.
src/app.ts
: The game entry-point. Setup cocos2d and start the start scene.src/config
: Config constantssrc/scenes
: cocos2d scenes for the gamesrc/scenes/start
: The start screensrc/scenes/shared
: Shared elements between scenessrc/scenes/game
: The main game screen
Ensure you have Node.js and Yarn installed then run
yarn install
yarn start
Then open your browser on http://localhost:55555/
Ensure you have XCode installed.
First run:
yarn install
yarn build
This will build the JS bundle.
Then open: frameworks/runtime-src/proj.ios_mac/twobunnies.xcodeproj
with XCode.
Finally select an iOS simulator or your iPhone and hit run.
Ensure you have Android Studio installed.
First run:
yarn install
yarn build
Then open: frameworks/runtime-src/proj.android
with Android Studio.
Finally select a device and run.