number keys for weapons; charger enemy is invulnerable
This commit is contained in:
parent
1d1d201520
commit
ae7d507a4c
5 changed files with 27 additions and 9 deletions
|
|
@ -137,8 +137,12 @@ func _process(delta: float) -> void:
|
|||
|
||||
damage_clock -= delta
|
||||
|
||||
if Input.is_action_just_pressed("swap_weapons"):
|
||||
gun_index += 1
|
||||
if Input.is_action_just_pressed("sharpshooter"):
|
||||
gun_index = 0
|
||||
if Input.is_action_just_pressed("minigun"):
|
||||
gun_index = 1
|
||||
if Input.is_action_just_pressed("mortar"):
|
||||
gun_index = 2
|
||||
|
||||
func damage(damager: Node3D) -> void:
|
||||
if health <= 0: return
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ collision_layer = 2
|
|||
collision_mask = 13
|
||||
script = ExtResource("1_4flbx")
|
||||
shake_noise = SubResource("FastNoiseLite_onrkg")
|
||||
guns = [NodePath("Guns/BasicGun"), NodePath("Guns/MiniGun"), NodePath("Guns/Mortar")]
|
||||
guns = [NodePath("Guns/Sharpshooter"), NodePath("Guns/MiniGun"), NodePath("Guns/Mortar")]
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=204505475]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||
|
|
@ -124,7 +124,7 @@ horizontal_alignment = 2
|
|||
|
||||
[node name="Guns" type="Node3D" parent="." unique_id=2018109083]
|
||||
|
||||
[node name="BasicGun" type="Node3D" parent="Guns" unique_id=1677055720]
|
||||
[node name="Sharpshooter" type="Node3D" parent="Guns" unique_id=1677055720]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("3_g1dw6")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue