fixed a few issues
This commit is contained in:
@@ -3,7 +3,7 @@ using System;
|
||||
using Movementtests.interfaces;
|
||||
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_target.png")]
|
||||
public partial class FixedDashthroughTarget : AnimatableBody3D, ITargetable, IStunnable
|
||||
public partial class FixedDashthroughTarget : AnimatableBody3D, ITargetable, IDisableable
|
||||
{
|
||||
public Vector3 GetTargetGlobalPosition()
|
||||
{
|
||||
@@ -16,15 +16,15 @@ public partial class FixedDashthroughTarget : AnimatableBody3D, ITargetable, ISt
|
||||
_defaultCollisionMask = CollisionMask;
|
||||
}
|
||||
|
||||
public bool IsStunned { get; set; }
|
||||
public float StunDuration { get; set; } = 0.1f;
|
||||
public void Stun()
|
||||
public bool IsDisabled { get; set; }
|
||||
public float DisableDuration { get; set; } = 0.1f;
|
||||
public void Disable()
|
||||
{
|
||||
_defaultCollisionMask = 0;
|
||||
GetTree().CreateTimer(StunDuration).Timeout += Unstun;
|
||||
GetTree().CreateTimer(DisableDuration).Timeout += Enable;
|
||||
}
|
||||
|
||||
public void Unstun()
|
||||
public void Enable()
|
||||
{
|
||||
_defaultCollisionMask = CollisionMask;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user