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;
|
2024-05-16 14:46:03 +00:00
|
|
|
|
private RoomNodeData? _roomNodeData;
|
2024-05-12 15:06:07 +00:00
|
|
|
|
|
2024-05-16 14:46:03 +00:00
|
|
|
|
public RoomNodeData? RoomNodeData
|
2024-05-12 15:06:07 +00:00
|
|
|
|
{
|
|
|
|
|
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
|
|
|
|
}
|