Last active
May 27, 2019 05:23
-
-
Save anchetaWern/ed071362ecbb81e89a543c2534bfc5d6 to your computer and use it in GitHub Desktop.
React Native Accelerometer Maze: Set up world and detect collisions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // App.js | |
| componentDidMount() { | |
| const { engine, world } = this._addObjectsToWorld(maze, theBall, goal); | |
| this.entities = this._getEntities(engine, world, maze, theBall, goal); | |
| this._setupCollisionHandler(engine); | |
| // next: subscribe to accelerometer | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment