add sounds w/ howler
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user