mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
31 lines
No EOL
656 B
C#
31 lines
No EOL
656 B
C#
using Godot;
|
|
|
|
namespace Cirno.Scripts.Actors;
|
|
|
|
[Tool]
|
|
public partial class ChestMarker : FeatureMarker
|
|
{
|
|
private Texture2D _markerTexture;
|
|
|
|
[Export]
|
|
public Texture2D MarkerTexture
|
|
{
|
|
get => _markerTexture;
|
|
set
|
|
{
|
|
_markerTexture = value;
|
|
if (Engine.IsEditorHint())
|
|
{
|
|
QueueRedraw();
|
|
}
|
|
}
|
|
}
|
|
|
|
public override void _Draw()
|
|
{
|
|
if (!Engine.IsEditorHint()) return;
|
|
if (MarkerTexture is null) return;
|
|
|
|
DrawTexture(MarkerTexture, -new Vector2(MarkerTexture.GetWidth() / 2f, MarkerTexture.GetHeight() / 2f));
|
|
}
|
|
} |