mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-08 18:45:55 +00:00
Destroyable props
This commit is contained in:
parent
93469062a1
commit
44ebc70448
52 changed files with 1387 additions and 18428 deletions
24
Scripts/Utils/MapProxy3D.cs
Normal file
24
Scripts/Utils/MapProxy3D.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Utils;
|
||||
|
||||
[Tool]
|
||||
public partial class MapProxy3D : Node3D
|
||||
{
|
||||
[ExportToolButton("Rebuild")] public Callable RebuildButton => Callable.From(Rebuild);
|
||||
|
||||
public void Rebuild()
|
||||
{
|
||||
if (!Engine.IsEditorHint()) return;
|
||||
|
||||
var children = GetChildren();
|
||||
foreach (var child in children)
|
||||
{
|
||||
if (child.HasMethod("verify_and_build"))
|
||||
{
|
||||
child.Call("verify_and_build");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue