18 lines
359 B
C#
18 lines
359 B
C#
using Godot;
|
|
|
|
public class WorldInfoComponent : Component
|
|
{
|
|
[Export] public NodePath WorldPath;
|
|
public World World;
|
|
|
|
// Called when the node enters the scene tree for the first time.
|
|
public override void _Ready()
|
|
{
|
|
World = GetNode<World>(WorldPath);
|
|
}
|
|
|
|
public void SetWorld(World world)
|
|
{
|
|
World = world;
|
|
}
|
|
} |