2025-07-25 08:13:35 +00:00
|
|
|
using Godot;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using Godot.Collections;
|
|
|
|
|
|
|
|
namespace Rokojori
|
|
|
|
{
|
|
|
|
[GlobalClass,Tool]
|
|
|
|
public partial class SetCollisionShape:Action
|
|
|
|
{
|
|
|
|
[Export]
|
|
|
|
public CollisionShape3D shape3D;
|
|
|
|
|
|
|
|
[Export]
|
|
|
|
public bool disabled = false;
|
|
|
|
|
|
|
|
protected override void _OnTrigger()
|
|
|
|
{
|
|
|
|
if ( shape3D == null )
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2025-07-25 15:35:19 +00:00
|
|
|
|
|
|
|
CallDeferred( nameof( DisableShape ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void DisableShape()
|
|
|
|
{
|
2025-07-25 08:13:35 +00:00
|
|
|
shape3D.Disabled = disabled;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|