From 6762d3bfab1f4d43add529081e9f1db89fe9c3aa Mon Sep 17 00:00:00 2001 From: Jeffrey Lanters Date: Wed, 27 Dec 2017 11:31:55 +0100 Subject: [PATCH] Added CanEmit --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2030888b..a0dd47ba 100644 --- a/README.md +++ b/README.md @@ -101,8 +101,12 @@ export class App extends React.Component { constructor () { this.spawnEnemies = new UnityEvent ('SpawnBehaviour', 'SpawnEnemies') } + onClickSpawnEnemies (count) { + if (this.spawnEnemies.canEmit () === true) + this.spawnEnemies.emit (count) + } render () { - return
+ return
Click to Spawn 5 Enemies
} }