alter vatter
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user