Finished working on the minimap system for the test level, shows pawns, enemy and friendly traps, and unfinished 'items'
This commit is contained in:
@@ -61,6 +61,13 @@ var just_revealed : bool = false
|
||||
signal removed(type : Trap.Type)
|
||||
signal disarmed(type : Trap.Type)
|
||||
signal activated(type : Trap.Type)
|
||||
signal revealed(is_visible : bool)
|
||||
|
||||
func _enter_tree() -> void:
|
||||
Game.level.add_map_marker(self)
|
||||
|
||||
func _exit_tree() -> void:
|
||||
Game.level.remove_map_marker(self)
|
||||
|
||||
func setup(type : Type, direction : Vector3, trap_owner : int) -> void:
|
||||
self.type = type
|
||||
@@ -84,6 +91,7 @@ func reveal() -> void:
|
||||
model.visible = true
|
||||
reveal_timer.start(5)
|
||||
just_revealed = true
|
||||
revealed.emit(true)
|
||||
|
||||
func is_just_revealed() -> bool:
|
||||
return just_revealed
|
||||
@@ -96,6 +104,7 @@ func _on_reveal_timeout() -> void:
|
||||
reveal_timer.start(5)
|
||||
else:
|
||||
model.visible = false
|
||||
revealed.emit(false)
|
||||
|
||||
func _ready() -> void:
|
||||
var owns_trap = trap_owner == Multiplayer.id
|
||||
|
||||
Reference in New Issue
Block a user