2024-05-12 10:00:47 +00:00
|
|
|
|
using Godot;
|
|
|
|
|
|
|
|
|
|
namespace ColdMint.scripts.levelGraphEditor;
|
|
|
|
|
|
|
|
|
|
public partial class RoomNode : GraphNode
|
|
|
|
|
{
|
2024-05-12 15:06:07 +00:00
|
|
|
|
private Label? _describeLabel;
|
|
|
|
|
private IRoomNodeData? _roomNodeData;
|
|
|
|
|
|
|
|
|
|
public IRoomNodeData? RoomNodeData
|
|
|
|
|
{
|
|
|
|
|
get => _roomNodeData;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (_describeLabel == null || value == null) return;
|
|
|
|
|
Title = value.Title;
|
2024-05-15 14:08:52 +00:00
|
|
|
|
_describeLabel.Text = string.IsNullOrEmpty(value.Description) ? string.Empty : value.Description;
|
2024-05-12 15:06:07 +00:00
|
|
|
|
_roomNodeData = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void _Ready()
|
|
|
|
|
{
|
|
|
|
|
base._Ready();
|
|
|
|
|
_describeLabel = GetNode<Label>("DescribeLabel");
|
|
|
|
|
}
|
2024-05-12 10:00:47 +00:00
|
|
|
|
}
|