egordorichev / LastTry

:deciduous_tree: LastTry is open-source game written in Java, using LibGDX library and inspired by Terraria :deciduous_tree:
MIT License
118 stars 17 forks source link

Replace SystemMessages #115

Closed Col-E closed 6 years ago

Col-E commented 6 years ago

Instead of sending the string set_block_x_y it now is like a packet containing data fields (Accessible via get(key)). Using the set_block example:

Engine.sendMessage(SystemMessage.Type.TILE_UPDATE.create()
    .with("action", "set")
    .with("value", value)
    .with("x", x)
    .with("y", y));
egordorichev commented 6 years ago

Thanks, Matt!