fixed like 5 bugs
This commit is contained in:
@ -5,14 +5,13 @@ class_name RocketLauncherWeapon extends ProjectileWeapon
|
||||
@export var targeting_ui_rect: TextureRect
|
||||
|
||||
var target_max: int = 3
|
||||
var targets: Array = []
|
||||
var target_icons: Array = []
|
||||
var targets: Array[EnemyController] = []
|
||||
var target_icons: Array[Sprite3D] = []
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
targeting_raycast.global_position = hero.camera.global_position
|
||||
|
||||
target_max = floori(stats.get_attribute("Target Limit"))
|
||||
for x: int in target_max:
|
||||
var icon: Sprite3D = target_icon_scene.instantiate()
|
||||
|
@ -40,6 +40,7 @@ target_position = Vector3(0, 0, -100)
|
||||
collision_mask = 4
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="." index="3"]
|
||||
visible = false
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
|
31
PCs/hero.gd
31
PCs/hero.gd
@ -117,10 +117,10 @@ func _process(delta: float) -> void:
|
||||
equip_weapon()
|
||||
if Input.is_action_just_pressed("Secondary Fire"):
|
||||
swap_weapons()
|
||||
if Input.is_action_just_pressed("Select Next Card"):
|
||||
if Input.is_action_just_pressed("Select Next Card") and inventory.size != 0:
|
||||
increment_selected()
|
||||
$AudioStreamPlayer.play()
|
||||
if Input.is_action_just_pressed("Select Previous Card"):
|
||||
if Input.is_action_just_pressed("Select Previous Card") and inventory.size != 0:
|
||||
decrement_selected()
|
||||
$AudioStreamPlayer.play()
|
||||
if Input.is_action_just_pressed("Primary Fire"):
|
||||
@ -179,12 +179,10 @@ func _unhandled_input(event: InputEvent) -> void:
|
||||
if !is_multiplayer_authority() or paused:
|
||||
return
|
||||
if editing_mode and event.is_action_pressed("Ready"):
|
||||
edit_tool.interact_key_held = false
|
||||
if !ready_state:
|
||||
ready_state = true
|
||||
hud.shrink_wave_start_label()
|
||||
$AudioStreamPlayer.play()
|
||||
networked_set_ready_state.rpc(ready_state)
|
||||
if ready_state:
|
||||
unready_self()
|
||||
else:
|
||||
ready_self()
|
||||
if event.is_action_pressed("Pause"):
|
||||
var menu: PauseMenu = pause_menu_scene.instantiate() as PauseMenu
|
||||
pause()
|
||||
@ -192,6 +190,23 @@ func _unhandled_input(event: InputEvent) -> void:
|
||||
hud.add_child(menu)
|
||||
|
||||
|
||||
func ready_self() -> void:
|
||||
edit_tool.interact_key_held = false
|
||||
if !ready_state:
|
||||
ready_state = true
|
||||
hud.shrink_wave_start_label()
|
||||
$AudioStreamPlayer.play()
|
||||
networked_set_ready_state.rpc(ready_state)
|
||||
|
||||
|
||||
func unready_self() -> void:
|
||||
if ready_state:
|
||||
ready_state = false
|
||||
hud.grow_wave_start_label()
|
||||
$AudioStreamPlayer.play()
|
||||
networked_set_ready_state(ready_state)
|
||||
|
||||
|
||||
func add_card(new_card: Card) -> void:
|
||||
inventory.add(new_card)
|
||||
hud.pickup(new_card)
|
||||
|
Reference in New Issue
Block a user