Class PSetDragHandler
Handles the dragging of partition sets using the partition set drag tool.
Inheritance
PSetDragHandler
Assembly: .dll
Syntax
public class PSetDragHandler
Constructors
PSetDragHandler(AmoebotSimulator)
Declaration
public PSetDragHandler(AmoebotSimulator sim)
Parameters
Fields
drag_active
Declaration
Field Value
drag_circuitData
Declaration
private RendererCircuits_Instance.ParticleCircuitData drag_circuitData
Field Value
drag_innerPin
Declaration
private RendererCircuits_Instance.ParticleCircuitData.PSetInnerPinRef drag_innerPin
Field Value
drag_originGridPos
Declaration
private Vector2Int drag_originGridPos
Field Value
Type |
Description |
Vector2Int |
|
drag_originNodeWorldPos
Declaration
private Vector2 drag_originNodeWorldPos
Field Value
quad
Declaration
Field Value
scale
Declaration
Field Value
sim
Declaration
private AmoebotSimulator sim
Field Value
Methods
AbortDrag()
Instantly cancels the current drag event.
Declaration
DragEvent_Finished(Vector2, Vector2)
Updates UI overlay and partition set positions according
to the currently finished mouse drag.
Does the same as DragEvent_Ongoing(Vector2, Vector2)
but ends the current drag event afterwards.
Declaration
public void DragEvent_Finished(Vector2 originWorldPos, Vector2 finalWorldPos)
Parameters
Type |
Name |
Description |
Vector2 |
originWorldPos |
The world coordinates of the
drag start position.
|
Vector2 |
finalWorldPos |
|
DragEvent_Ongoing(Vector2, Vector2)
Updates UI overlay and partition set positions according
to the current ongoing mouse drag.
Declaration
public void DragEvent_Ongoing(Vector2 originWorldPos, Vector2 curWorldPos)
Parameters
Type |
Name |
Description |
Vector2 |
originWorldPos |
The world coordinates of the
drag start position.
|
Vector2 |
curWorldPos |
The world coordinates of the
current drag position.
|
Update(Vector2, Vector2Int)
Call this each frame with the current mouse world position
and field if the partition set move tool is active.
Declaration
public void Update(Vector2 curMouseWorldPosition, Vector2Int curMouseWorldField)
Parameters
Type |
Name |
Description |
Vector2 |
curMouseWorldPosition |
The world coordinates of
the current mouse position.
|
Vector2Int |
curMouseWorldField |
The grid coordinates of the
node the mouse is currently over.
|