fix other stuff from map switching
parent
df6b75613c
commit
fe11421fc1
|
@ -16,6 +16,8 @@ namespace SupaLidlGame.BoundingBoxes
|
||||||
[Export]
|
[Export]
|
||||||
public float Damage { get; set; }
|
public float Damage { get; set; }
|
||||||
|
|
||||||
|
private bool _isDisabled = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Getter/setter for the CollisionShape2D's Disabled property.
|
/// Getter/setter for the CollisionShape2D's Disabled property.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -24,6 +26,9 @@ namespace SupaLidlGame.BoundingBoxes
|
||||||
{
|
{
|
||||||
get => _collisionShape.Disabled;
|
get => _collisionShape.Disabled;
|
||||||
set
|
set
|
||||||
|
{
|
||||||
|
_isDisabled = value;
|
||||||
|
if (_collisionShape is not null)
|
||||||
{
|
{
|
||||||
_collisionShape.Disabled = value;
|
_collisionShape.Disabled = value;
|
||||||
if (value)
|
if (value)
|
||||||
|
@ -32,6 +37,7 @@ namespace SupaLidlGame.BoundingBoxes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Export]
|
[Export]
|
||||||
public float Knockback { get; set; }
|
public float Knockback { get; set; }
|
||||||
|
@ -47,6 +53,7 @@ namespace SupaLidlGame.BoundingBoxes
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
_collisionShape = GetNode<CollisionShape2D>("CollisionShape2D");
|
_collisionShape = GetNode<CollisionShape2D>("CollisionShape2D");
|
||||||
|
IsDisabled = _isDisabled; // sets _collisionShape.Disabled
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool ShouldParry(Hitbox box)
|
private bool ShouldParry(Hitbox box)
|
||||||
|
|
|
@ -141,7 +141,6 @@ StateMachine = NodePath("StateMachine")
|
||||||
Faction = 1
|
Faction = 1
|
||||||
|
|
||||||
[node name="Camera2D" parent="." instance=ExtResource("4_ym125")]
|
[node name="Camera2D" parent="." instance=ExtResource("4_ym125")]
|
||||||
position_smoothing_enabled = true
|
|
||||||
position_smoothing_speed = 8.0
|
position_smoothing_speed = 8.0
|
||||||
|
|
||||||
[node name="Sprite" type="AnimatedSprite2D" parent="."]
|
[node name="Sprite" type="AnimatedSprite2D" parent="."]
|
||||||
|
@ -174,6 +173,7 @@ script = ExtResource("6_6bgrj")
|
||||||
IdleState = NodePath("../Idle")
|
IdleState = NodePath("../Idle")
|
||||||
|
|
||||||
[node name="Debug" type="Control" parent="."]
|
[node name="Debug" type="Control" parent="."]
|
||||||
|
visible = false
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 0
|
anchors_preset = 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue