Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save anchetaWern/ed071362ecbb81e89a543c2534bfc5d6 to your computer and use it in GitHub Desktop.

Select an option

Save anchetaWern/ed071362ecbb81e89a543c2534bfc5d6 to your computer and use it in GitHub Desktop.
React Native Accelerometer Maze: Set up world and detect collisions
// 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