Finished working on the minimap system for the test level, shows pawns, enemy and friendly traps, and unfinished 'items'
This commit is contained in:
@@ -9,7 +9,9 @@ enum State {
|
||||
DEAD
|
||||
}
|
||||
|
||||
|
||||
const trap_template = preload("res://templates/trap.tscn")
|
||||
|
||||
const remove_trap_modal = preload("res://templates/remove_trap_modal.tscn")
|
||||
const disarm_trap_modal = preload("res://templates/disarm_trap_modal.tscn")
|
||||
|
||||
@@ -74,6 +76,13 @@ signal combat_target_changed(melee : bool)
|
||||
signal ammo_changed(current : int, max : int)
|
||||
signal struggling(value : float)
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
Game.level.add_map_marker(self)
|
||||
|
||||
func _exit_tree() -> void:
|
||||
Game.level.remove_map_marker(self)
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
if attack_timer > 0:
|
||||
attack_timer -= delta
|
||||
@@ -359,7 +368,7 @@ func start_detecting() -> void:
|
||||
detecting = true
|
||||
update_detect_region.rpc(false)
|
||||
|
||||
@rpc("authority")
|
||||
@rpc("authority", "call_local")
|
||||
func update_detect_region(update : bool) -> void:
|
||||
var new_square : Vector3i = (global_position - Vector3.ONE * .5).round()
|
||||
if update and new_square == current_square:
|
||||
|
||||
Reference in New Issue
Block a user