Class PSetDragHandler
Handles the dragging of partition sets using the partition set drag tool.
Inheritance
object
PSetDragHandler
Assembly: .dll
Syntax
public class PSetDragHandler
Constructors
|
Edit this page
View Source
PSetDragHandler(AmoebotSimulator)
Declaration
public PSetDragHandler(AmoebotSimulator sim)
Parameters
Fields
|
Edit this page
View Source
drag_active
Declaration
Field Value
|
Edit this page
View Source
drag_circuitData
Declaration
private RendererCircuits_Instance.ParticleCircuitData drag_circuitData
Field Value
|
Edit this page
View Source
drag_innerPin
Declaration
private RendererCircuits_Instance.ParticleCircuitData.PSetInnerPinRef drag_innerPin
Field Value
|
Edit this page
View Source
drag_originGridPos
Declaration
private Vector2Int drag_originGridPos
Field Value
Type |
Description |
Vector2Int |
|
|
Edit this page
View Source
drag_originNodeWorldPos
Declaration
private Vector2 drag_originNodeWorldPos
Field Value
|
Edit this page
View Source
quad
Declaration
Field Value
|
Edit this page
View Source
scale
Declaration
Field Value
|
Edit this page
View Source
sim
Declaration
private AmoebotSimulator sim
Field Value
Methods
|
Edit this page
View Source
AbortDrag()
Instantly cancels the current drag event.
Declaration
|
Edit this page
View Source
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 |
|
|
Edit this page
View Source
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.
|
|
Edit this page
View Source
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.
|