We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0f4406c + 6762d3b commit a99f939Copy full SHA for a99f939
README.md
@@ -101,8 +101,12 @@ export class App extends React.Component {
101
constructor () {
102
this.spawnEnemies = new UnityEvent ('SpawnBehaviour', 'SpawnEnemies')
103
}
104
+ onClickSpawnEnemies (count) {
105
+ if (this.spawnEnemies.canEmit () === true)
106
+ this.spawnEnemies.emit (count)
107
+ }
108
render () {
- return <div onClick={ this.spawnEnemies.emit (5) }>
109
+ return <div onClick={ this.onClickSpawnEnemies.bind (this, 5) }>
110
Click to Spawn 5 Enemies</div>
111
112
0 commit comments