2022-12-28 16:22:53 +01:00
|
|
|
using Godot;
|
|
|
|
|
2023-02-12 16:30:56 +01:00
|
|
|
public class WorldInfoComponent : Component
|
2022-12-28 16:22:53 +01:00
|
|
|
{
|
2023-11-10 11:11:08 +01:00
|
|
|
[Export] public NodePath WorldPath;
|
|
|
|
public World World;
|
2022-12-28 16:22:53 +01:00
|
|
|
|
|
|
|
// Called when the node enters the scene tree for the first time.
|
|
|
|
public override void _Ready()
|
|
|
|
{
|
2023-11-10 11:11:08 +01:00
|
|
|
World = GetNode<World>(WorldPath);
|
2022-12-28 16:22:53 +01:00
|
|
|
}
|
|
|
|
|
2023-11-10 11:11:08 +01:00
|
|
|
public void SetWorld(World world)
|
2022-12-28 16:22:53 +01:00
|
|
|
{
|
2023-11-10 11:11:08 +01:00
|
|
|
World = world;
|
2022-12-28 16:22:53 +01:00
|
|
|
}
|
|
|
|
}
|