Files
MovementTests/scenes/FixedDashTarget/FixedDashthroughTarget.cs
Minimata 916a6e7153
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 33s
Create tag and build when new code gets to main / Test (push) Successful in 6m19s
Create tag and build when new code gets to main / Export (push) Successful in 7m39s
some editor icons and a base level scene
2026-01-27 10:35:35 +01:00

32 lines
766 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, IStunnable
{
public Vector3 GetTargetGlobalPosition()
{
return GlobalPosition;
}
private uint _defaultCollisionMask;
public override void _Ready()
{
_defaultCollisionMask = CollisionMask;
}
public bool IsStunned { get; set; }
public float StunDuration { get; set; } = 0.1f;
public void Stun()
{
_defaultCollisionMask = 0;
GetTree().CreateTimer(StunDuration).Timeout += Unstun;
}
public void Unstun()
{
_defaultCollisionMask = CollisionMask;
}
}