blob: fc70dc23ede3ada16b0217032b06ac42510e2343 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
world = require("world")
log = require("log")
NetworkedComponent = require("ecs.networked")
Component = require("ecs.component")
class ClientNetworkedComponent extends Component
new: (name, properties) =>
log.info("Creating client networked info", {"client"})
super(name, properties)
listen_events: () ->
assert(wold.network, "world.network needs to be set before hooking events")
world.network\listen("create","client_network_component",(hubid, data) ->
error("ClientNetworkComponent create received:".. tostring(data))
)
world.network\listen("update","client_network_component",(hubid, data) ->
error("ClientNetworkComponent update received:".. tostring(data))
)
ClientNetworkedComponent
|