Traveller/scripts/furniture/GuiFurniture.cs
Cold-Mint ba11bf06da
Make spell separation table.
制作法术分离工作台。
2024-09-13 23:04:39 +08:00

47 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Godot;
namespace ColdMint.scripts.furniture;
/// <summary>
/// <para>GUIFurnitureTemplate</para>
/// <para>带有图形用户页面的家居模板</para>
/// </summary>
public partial class GuiFurniture : Furniture
{
/// <summary>
/// <para>Operating range of furniture</para>
/// <para>家具的操作范围</para>
/// </summary>
/// <remarks>
///<para>For furniture with graphical user pages, the player must enter the action range and press the shortcut key to display the UI page.</para>
///<para>对于带有图形用户页面的家具来说玩家必须进入操作范围内按下快捷键才能显示UI页面。</para>
/// </remarks>
private Area2D? _operateArea2D;
public override void _Ready()
{
base._Ready();
_operateArea2D = GetNode<Area2D>("OperateArea2D");
_operateArea2D.BodyEntered += OnBodyEntered;
_operateArea2D.BodyExited += OnBodyExited;
}
private void OnBodyEntered(Node node)
{
}
private void OnBodyExited(Node2D node2D)
{
}
public override void _ExitTree()
{
if (_operateArea2D != null)
{
_operateArea2D.BodyEntered -= OnBodyEntered;
_operateArea2D.BodyExited -= OnBodyExited;
}
}
}