fixed some ui stuff

This commit is contained in:
2023-11-09 17:56:08 +11:00
parent 0427a58635
commit e63b765753
17 changed files with 146 additions and 36 deletions

View File

@ -7,7 +7,7 @@ var scope_mask : Texture
func hold_second_trigger():
super.hold_second_trigger()
$CanvasLayer.set_visible(true)
hero.zoom_factor = 3.0
hero.set_zoom_factor(3.0)
func release_second_trigger():

View File

@ -40,6 +40,10 @@ var currency := 0 :
@export var sprint_zoom_speed := 0.2
func set_zoom_factor(value):
movement.zoom_factor = value
func _ready() -> void:
if is_multiplayer_authority():
right_hand_animator.play("weapon_sway")
@ -149,11 +153,15 @@ func _unhandled_input(event: InputEvent) -> void:
func unpause():
paused = false
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
movement.set_process(true)
movement.set_physics_process(true)
func pause():
paused = true
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
movement.set_process(false)
movement.set_physics_process(false)
func enter_editing_mode(value):

View File

@ -153,7 +153,6 @@ projection = 1
size = 15.0
script = ExtResource("12_3hpi3")
anchor = NodePath("../..")
face_north = true
[node name="HUD" type="CanvasLayer" parent="." node_paths=PackedStringArray("wave_count", "lives_count", "enemy_count", "currency_count", "crosshair", "minimap", "minimap_cam", "minimap_viewport", "fps_label", "enemy_sprites", "enemy_counts")]
script = ExtResource("8_yl6ka")
@ -306,6 +305,7 @@ horizontal_alignment = 1
vertical_alignment = 1
[node name="EnemyCount" type="Label" parent="HUD"]
visible = false
offset_left = 10.0
offset_top = 80.0
offset_right = 123.0