Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Testing out [create-react-app](https://github.com/facebookincubator/create-react-app) and [react-game-kit](https://github.com/FormidableLabs/react-game-kit).
T esting out [create-react-app](https://github.com/facebookincubator/create-react-app) and [react-game-kit](https://github.com/FormidableLabs/react-game-kit).
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo here

19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
"private": true,
"homepage": "http://jeffreyatw.github.io/react-redux-platformer",
"devDependencies": {
"react-scripts": "0.4.1"
"react-scripts": "^1.1.0"
},
"dependencies": {
"react": "^15.3.1",
"react-addons-update": "^15.3.1",
"react-dom": "^15.3.1",
"react-game-kit": "0.0.1",
"react-redux": "^4.4.5",
"redux": "^3.6.0",
"redux-thunk": "^2.1.0",
"reselect": "^2.5.4"
"immutability-helper": "^2.6.4",
"prop-types": "^15.6.0",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-game-kit": "^1.0.6",
"react-redux": "^5.0.6",
"redux": "^3.7.2",
"redux-thunk": "^2.2.0",
"reselect": "^3.0.1"
},
"scripts": {
"start": "react-scripts start",
Expand Down
File renamed without changes.
6 changes: 0 additions & 6 deletions src/components/app/App.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import GameLoop from 'react-game-kit/lib/utils/game-loop';
import store from '../../store';
import GameContainer from '../game/GameContainer';

// monkeypatch GameLoop to delete instead of splice
GameLoop.prototype.unsubscribe = function (id) {
delete this.subscribers[id - 1];
}

class App extends Component {
render() {
return (
Expand Down
3 changes: 2 additions & 1 deletion src/components/block/Block.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from "prop-types";
import { STAGE_HEIGHT } from '../../constants';
import PartContainer from '../part/PartContainer';
import Matter from 'matter-js';
Expand Down
5 changes: 3 additions & 2 deletions src/components/character/Character.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from "prop-types";
import { Body } from 'react-game-kit';

class Character extends Component {
Expand Down Expand Up @@ -92,7 +93,7 @@ class Character extends Component {
width: `${width}px`,
};
}

paint() {
let background = this.background;
if (this.props.background) {
Expand Down
3 changes: 2 additions & 1 deletion src/components/countdown/Countdown.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from "prop-types";
import './Countdown.css';

class Countdown extends Component {
Expand Down
3 changes: 2 additions & 1 deletion src/components/game/Game.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from "prop-types";
import { Loop, Stage, World } from 'react-game-kit';
import { STAGE_HEIGHT, STAGE_WIDTH } from '../../constants';
import HighScoreContainer from '../highScore/HighScoreContainer';
Expand Down
3 changes: 2 additions & 1 deletion src/components/gameOver/GameOver.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from "prop-types";

class GameOver extends Component {
static propTypes = {
Expand Down
3 changes: 2 additions & 1 deletion src/components/highScore/HighScore.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from "prop-types";
import './HighScore.css';

class HighScore extends Component {
Expand Down
5 changes: 3 additions & 2 deletions src/components/level/Level.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from "prop-types";
import { BLOCK_DIMENSION, STAGE_HEIGHT, STAGE_WIDTH } from '../../constants';
import BlockContainer from '../block/BlockContainer';
import FloorContainer from '../floor/FloorContainer';
Expand All @@ -20,7 +21,7 @@ class Level extends Component {
[0,0,0,0,0],

[0,0,1,1,2],

[0,0,1,2,2],

[0,1,2,3,4],
Expand Down
3 changes: 2 additions & 1 deletion src/components/part/Part.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from "prop-types";
import { BLOCK_DIMENSION } from '../../constants';
import Character from '../character/Character';

Expand Down
3 changes: 2 additions & 1 deletion src/components/score/Score.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from "prop-types";

class Score extends Component {
static propTypes = {
Expand Down
3 changes: 2 additions & 1 deletion src/components/stageSetter/StageSetter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, PropTypes } from 'react';
import { Component } from 'react';
import PropTypes from "prop-types";

class StageSetter extends Component {
static contextTypes = {
Expand Down
3 changes: 2 additions & 1 deletion src/reducerMaps/blocks.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import update from 'react-addons-update';
import update from 'immutability-helper';

import actionTypes from '../actionTypes';

export default new Map([
Expand Down
2 changes: 1 addition & 1 deletion src/reducerMaps/game.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import update from 'react-addons-update';
import update from 'immutability-helper';
import initialState from '../initialState';
import actionTypes from '../actionTypes';

Expand Down
2 changes: 1 addition & 1 deletion src/reducerMaps/six.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import update from 'react-addons-update';
import update from 'immutability-helper';
import actionTypes from '../actionTypes';

export default new Map([
Expand Down
2 changes: 1 addition & 1 deletion src/reducerMaps/stage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import update from 'react-addons-update';
import update from 'immutability-helper';
import actionTypes from '../actionTypes';

export default new Map([
Expand Down
Loading