Private
Public Access
1
0

add sounds w/ howler

This commit is contained in:
2016-10-31 15:13:01 +01:00
parent 2468dca361
commit 83679ef2c1
4 changed files with 22 additions and 7 deletions

View File

@@ -68,10 +68,6 @@ class MineSeeker extends React.Component {
if (this.refs.gridControl.state.webPlayer === null) {
if (this.state.gameInherited) {
this.refs.gridControl.state.webPlayer = 'blue';
// this.refs.gridControl.refs.userControl.setState({activePlayer: this.refs.gridControl.refs.userControl.state.activePlayer ? 0 : 1});
// this.refs.gridControl.refs.userControl.refs.red.setState({active: false});
// this.refs.gridControl.refs.userControl.refs.blue.setState({active: true});
} else {
this.refs.gridControl.state.webPlayer = 'red';
}
@@ -89,8 +85,6 @@ class MineSeeker extends React.Component {
if (this.refs.gridControl.state.webPlayer !== payload.data.player) {
console.warn('Opponent stepped: Auto-Step process');
this.refs.gridControl.stepEvent(payload.data.coords);
} else {
// this.refs.gridControl.stepEvent(payload.data.coords);
}
} else {
console.info("User has been subscribed to the channel!");
@@ -112,7 +106,7 @@ class MineSeeker extends React.Component {
onClick(coords) {
var activePlayer = this.refs.gridControl.refs.userControl.state.activePlayer ? 'blue' : 'red';
/** Player can step if it turns */
/** Player step and it is the current player */
if (activePlayer === this.refs.gridControl.state.webPlayer) {
this.refs.gridControl.stepEvent(coords);