2024-09-14 06:41:52 +00:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using Godot;
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Rokojori
|
|
|
|
{
|
|
|
|
[Tool]
|
|
|
|
[GlobalClass]
|
|
|
|
public partial class GeneratorEntry:Node3D
|
|
|
|
{
|
|
|
|
[Export]
|
|
|
|
public PackedScene packedScene;
|
|
|
|
|
2025-01-03 12:09:23 +00:00
|
|
|
[Export]
|
|
|
|
public Node3D node3D;
|
|
|
|
|
|
|
|
[Export]
|
|
|
|
public bool refreshNode3D = false;
|
|
|
|
|
|
|
|
[Export]
|
|
|
|
public bool useInstancing = false;
|
|
|
|
|
|
|
|
protected PackedScene _cachedNode3DScene;
|
|
|
|
|
|
|
|
public PackedScene GetPackedScene()
|
|
|
|
{
|
|
|
|
if ( packedScene != null )
|
|
|
|
{
|
|
|
|
return packedScene;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( refreshNode3D || _cachedNode3DScene == null )
|
|
|
|
{
|
|
|
|
refreshNode3D = false;
|
|
|
|
_cachedNode3DScene = new PackedScene();
|
|
|
|
_cachedNode3DScene.Pack( node3D );
|
|
|
|
}
|
|
|
|
|
|
|
|
return _cachedNode3DScene;
|
|
|
|
}
|
|
|
|
|
2024-09-14 06:41:52 +00:00
|
|
|
[Export]
|
|
|
|
public float probability = 1;
|
|
|
|
|
|
|
|
[Export]
|
|
|
|
public Node3D container;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|