Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
doorbash committed Sep 21, 2020
1 parent e2e9b74 commit fe845b1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ state.primitives.onChange = { changes ->
}
}
}

state.players.onAdd = { player: Player?, key: Int? ->
println("player added: " + key + " " + player?.x)
}
Expand All @@ -129,19 +130,19 @@ state.players.onRemove = { player: Player?, key: Int? ->
}

/* Message Listeners */
//set listener by message type
//Set listener by message type
onMessage("hi") { cells: MapSchema<Cell> ->
println("cells size is ${cells.size}")
println(cells)
}

// set listener by type
// Set listener by type
onMessage { primitives: PrimitivesTest ->
println("some primitives...")
println(primitives._string)
}

// set listener by type id
// Set listener by type id
onMessage(2) { cell: Cell ->
println("handler for type 2")
println(cell.x)
Expand Down

0 comments on commit fe845b1

Please sign in to comment.