27 lines
447 B
C#
27 lines
447 B
C#
![]() |
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;
|
||
|
}
|
||
|
|
||
|
shape3D.Disabled = disabled;
|
||
|
}
|
||
|
}
|
||
|
}
|