Add alt fire to RangedIdleState
parent
a37288e672
commit
3b9522eae4
|
@ -17,11 +17,9 @@ gradient = SubResource("Gradient_uqfn8")
|
||||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_yg5po"]
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_yg5po"]
|
||||||
particle_flag_disable_z = true
|
particle_flag_disable_z = true
|
||||||
direction = Vector3(-1, 0, 0)
|
direction = Vector3(-1, 0, 0)
|
||||||
gravity = Vector3(0, 0, 0)
|
|
||||||
initial_velocity_min = 4.0
|
initial_velocity_min = 4.0
|
||||||
initial_velocity_max = 8.0
|
initial_velocity_max = 8.0
|
||||||
orbit_velocity_min = 0.0
|
gravity = Vector3(0, 0, 0)
|
||||||
orbit_velocity_max = 0.0
|
|
||||||
scale_min = 2.0
|
scale_min = 2.0
|
||||||
scale_max = 2.0
|
scale_max = 2.0
|
||||||
color_ramp = SubResource("GradientTexture1D_te0n4")
|
color_ramp = SubResource("GradientTexture1D_te0n4")
|
||||||
|
@ -41,6 +39,7 @@ texture = ExtResource("1_0im1r")
|
||||||
centered = false
|
centered = false
|
||||||
|
|
||||||
[node name="Hitbox" parent="." instance=ExtResource("3_f4lib")]
|
[node name="Hitbox" parent="." instance=ExtResource("3_f4lib")]
|
||||||
|
priority = 5
|
||||||
|
|
||||||
[node name="CollisionShape2D" parent="Hitbox" index="0"]
|
[node name="CollisionShape2D" parent="Hitbox" index="0"]
|
||||||
position = Vector2(0, -0.5)
|
position = Vector2(0, -0.5)
|
||||||
|
|
|
@ -8,6 +8,9 @@ public partial class RangedIdleState : WeaponState
|
||||||
[Export]
|
[Export]
|
||||||
public WeaponState FireState { get; set; }
|
public WeaponState FireState { get; set; }
|
||||||
|
|
||||||
|
[Export]
|
||||||
|
public WeaponState AltFireState { get; set; }
|
||||||
|
|
||||||
[Export]
|
[Export]
|
||||||
public Items.Weapons.Ranged Weapon { get; set; }
|
public Items.Weapons.Ranged Weapon { get; set; }
|
||||||
|
|
||||||
|
@ -30,6 +33,12 @@ public partial class RangedIdleState : WeaponState
|
||||||
return FireState;
|
return FireState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override WeaponState UseAlt()
|
||||||
|
{
|
||||||
|
GD.Print("Alt fire");
|
||||||
|
return AltFireState;
|
||||||
|
}
|
||||||
|
|
||||||
public override void Exit(IState<WeaponState> nextState)
|
public override void Exit(IState<WeaponState> nextState)
|
||||||
{
|
{
|
||||||
Weapon.Visible = true;
|
Weapon.Visible = true;
|
||||||
|
|
Loading…
Reference in New Issue