Working prototype

This commit is contained in:
Sch1nken 2024-03-16 19:56:22 +01:00
parent 3de181134d
commit 1ed0ec226d
24 changed files with 682 additions and 31 deletions

View file

@ -347,6 +347,8 @@ func place_insect_tile(resource_path: String, is_black: bool, pos: Vector4i) ->
add_child(tile_copy)
GameEvents.insect_tile_created.emit(tile_copy, pos)
var tween = get_tree().create_tween()
tween.tween_property(tile_copy, "position", target_pos, 1.0).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_EXPO)
@ -455,7 +457,7 @@ func move_insect_tile(tile_coords: Vector4i, target: Vector4i) -> void:
var below: Vector4i = tile.coordinates + Vector4i(0, 0, 0, -1)
used_cells[below].hat = tile
# Add to new stack
GameEvents.insect_tile_finished_moving.emit(tile, target)
func _on_insect_tile_moved(tile: InsectTile, target: Vector4i) -> void:
move_insect_tile.rpc(tile.coordinates, target)