Refactored to allow hotseat and multiplayer. TODO: Create interface class for webrtc/enet multiplayer

This commit is contained in:
Sch1nken 2024-03-22 01:37:05 +01:00
parent d688eaf9c6
commit 5fe8f22ccb
27 changed files with 798 additions and 135 deletions

View file

@ -339,12 +339,16 @@ func place_insect_tile(resource_path: String, is_black: bool, pos: Vector4i) ->
tile_copy.resource = resource
tile_copy.is_black = is_black
tile_copy.coordinates = pos
#print(pos)
#print(pos)
tile_copy.map_reference = self
var target_pos = Vector3(hex_pos.x, 0.0, hex_pos.y)
used_cells[pos] = tile_copy
var sender_id = multiplayer.get_remote_sender_id()
tile_copy.set_multiplayer_authority(sender_id)
add_child(tile_copy)
GameEvents.insect_tile_created.emit(tile_copy, pos)