GodotComponentTest/components/WorldInfoComponent.cs

15 lines
351 B
C#
Raw Permalink Normal View History

using Godot;
2023-11-18 22:32:57 +01:00
public class WorldInfoComponent : Component {
[Export] public NodePath WorldPath;
public World World;
// Called when the node enters the scene tree for the first time.
2023-11-18 22:32:57 +01:00
public override void _Ready() {
World = GetNode<World>(WorldPath);
}
2023-11-18 22:32:57 +01:00
public void SetWorld(World world) {
World = world;
}
}