alter vatter

This commit is contained in:
2026-07-29 18:50:14 +02:00
parent 59a9516d99
commit 9824b30435
53 changed files with 1054 additions and 69 deletions

View File

@@ -3,12 +3,13 @@ using Godot;
[SceneTree]
public partial class MeetingPhysicsBox : RigidBody2D
{
[Export]
public MeetingResource MeetingResource { get; set; } = new DummyMeetingResource();
private Vector2 _dragTarget;
private bool _isDragging;
private bool _mouseInside;
private bool _isDragging;
private Vector2 _dragTarget;
[Export]
public MeetingResource MeetingResource { get; set; } = new DummyMeetingResource();
public override void _Ready()
{
@@ -34,16 +35,12 @@ public partial class MeetingPhysicsBox : RigidBody2D
using (@event)
{
if (@event is InputEventMouse mouseEvent)
{
if (_mouseInside)
{
if (mouseEvent.IsPressed() && mouseEvent.ButtonMask == MouseButtonMask.Left)
{
GD.Print("Start Dragging");
StartDragging();
}
}
}
}
}
@@ -80,5 +77,6 @@ public partial class MeetingPhysicsBox : RigidBody2D
meetingControl.Position = new Vector2(-5000, -5000);
GetParent().RemoveChild(this);
_mouseInside = false;
}
}