started work on minimap
This commit is contained in:
@@ -12,8 +12,6 @@ var interact_visible : bool = false
|
||||
var health_bar_start_pos
|
||||
var money_count : int = 0
|
||||
|
||||
var crosshair_target
|
||||
|
||||
@onready var level_control = get_tree().current_scene
|
||||
@onready var player = level_control.player
|
||||
@onready var health_bar: ProgressBar = $WobbleItems/HealthBar
|
||||
@@ -23,17 +21,12 @@ var crosshair_target
|
||||
@onready var ammo_reserve: Label = $WobbleItems/GunInfo/VBoxContainer/AmmoCounter/AmmoReserve
|
||||
@onready var gun_info: MarginContainer = $WobbleItems/GunInfo
|
||||
@onready var money: Label = $WobbleItems/Money
|
||||
@onready var crosshair_center: TextureRect = $StaticItems/CrosshairCenter
|
||||
@onready var pickup_item_indicator = preload("res://assets/pickup_item_indicator.tscn")
|
||||
@onready var wobble_items: Control = $WobbleItems
|
||||
@onready var timer_counter: Label = $WobbleItems/Timer_counter
|
||||
|
||||
|
||||
const STAM_BAR_MAX_OPACITY = 1.0
|
||||
const CROSSHAIR_SIZE = Vector2(40,40)
|
||||
const MAX_HUD_WOBBLE_AMT = Vector2(100,100)
|
||||
|
||||
var pickup_notifs = []
|
||||
var minimap_points = {}
|
||||
var can_spawn = true
|
||||
|
||||
#HUD WOBBLE
|
||||
@@ -49,6 +42,7 @@ func _ready() -> void:
|
||||
SignalBus.player_hit.connect(player_hit)
|
||||
SignalBus.ui_timer_update.connect(update_timer)
|
||||
SignalBus.ui_timer_visibility.connect(toggle_timer_visibility)
|
||||
SignalBus.ui_minimap_point.connect(add_minimap_point)
|
||||
|
||||
money_count = GameGlobals.money
|
||||
|
||||
@@ -56,7 +50,6 @@ func _ready() -> void:
|
||||
|
||||
health_bar_start_pos = health_bar.position
|
||||
|
||||
crosshair_target = CROSSHAIR_SIZE
|
||||
timer_counter.visible = false
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
@@ -124,6 +117,7 @@ func _process(delta: float) -> void:
|
||||
|
||||
## SPAWN NOTIFICATIONS
|
||||
spawn_notifs()
|
||||
#WOBBLE HUD
|
||||
wobble_items.position = hud_wobble(delta/Engine.time_scale)
|
||||
|
||||
func toggle_timer_visibility(timer_visible):
|
||||
@@ -174,6 +168,11 @@ func spawn_notifs():
|
||||
await get_tree().create_timer(.2).timeout
|
||||
can_spawn = true
|
||||
|
||||
func add_minimap_point(node_owner,point_position,color):
|
||||
var key = node_owner.name
|
||||
var data = {"position" : point_position,"color" : color}
|
||||
minimap_points[key] = data
|
||||
|
||||
func player_hit():
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user