Files
Patrick Dawson 19f83efe72 Add export plugin
2024-06-19 00:23:32 +02:00

23 lines
527 B
C#

using Godot;
using ImGuiNET;
namespace CSharpGameProject;
public partial class Sprite : Sprite2D
{
public override void _Process(double delta)
{
Position = new((float)(Position.X + (delta * 10.0)), Position.Y);
#if IMGUI
ImGui.Begin($"SpriteTool: {Name}", ImGuiWindowFlags.AlwaysAutoResize);
int[] pos = [(int)Position.X, (int)Position.Y];
if (ImGui.DragInt2("position", ref pos[0]))
{
Position = new(pos[0], pos[1]);
}
ImGui.End();
#endif
}
}