Files
MovementTests/scenes/fixed_dash_target/FixedDashthroughTarget.cs
Minimata 7ba4a3db3f
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 30s
Create tag and build when new code gets to main / Export (push) Successful in 6m0s
fixed a few issues
2026-05-06 16:25:56 +02:00

32 lines
778 B
C#

using Godot;
using System;
using Movementtests.interfaces;
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_target.png")]
public partial class FixedDashthroughTarget : AnimatableBody3D, ITargetable, IDisableable
{
public Vector3 GetTargetGlobalPosition()
{
return GlobalPosition;
}
private uint _defaultCollisionMask;
public override void _Ready()
{
_defaultCollisionMask = CollisionMask;
}
public bool IsDisabled { get; set; }
public float DisableDuration { get; set; } = 0.1f;
public void Disable()
{
_defaultCollisionMask = 0;
GetTree().CreateTimer(DisableDuration).Timeout += Enable;
}
public void Enable()
{
_defaultCollisionMask = CollisionMask;
}
}