Add alt fire to RangedIdleState

pull/43/head
John Montagu, the 4th Earl of Sandvich 2024-08-25 23:57:15 -07:00
parent a37288e672
commit 3b9522eae4
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
2 changed files with 11 additions and 3 deletions

View File

@ -17,11 +17,9 @@ gradient = SubResource("Gradient_uqfn8")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_yg5po"]
particle_flag_disable_z = true
direction = Vector3(-1, 0, 0)
gravity = Vector3(0, 0, 0)
initial_velocity_min = 4.0
initial_velocity_max = 8.0
orbit_velocity_min = 0.0
orbit_velocity_max = 0.0
gravity = Vector3(0, 0, 0)
scale_min = 2.0
scale_max = 2.0
color_ramp = SubResource("GradientTexture1D_te0n4")
@ -41,6 +39,7 @@ texture = ExtResource("1_0im1r")
centered = false
[node name="Hitbox" parent="." instance=ExtResource("3_f4lib")]
priority = 5
[node name="CollisionShape2D" parent="Hitbox" index="0"]
position = Vector2(0, -0.5)

View File

@ -8,6 +8,9 @@ public partial class RangedIdleState : WeaponState
[Export]
public WeaponState FireState { get; set; }
[Export]
public WeaponState AltFireState { get; set; }
[Export]
public Items.Weapons.Ranged Weapon { get; set; }
@ -30,6 +33,12 @@ public partial class RangedIdleState : WeaponState
return FireState;
}
public override WeaponState UseAlt()
{
GD.Print("Alt fire");
return AltFireState;
}
public override void Exit(IState<WeaponState> nextState)
{
Weapon.Visible = true;