Search Results for

    Show / Hide Table of Contents

    Class PSetDragHandler

    Handles the dragging of partition sets using the partition set drag tool.

    Inheritance
    object
    PSetDragHandler
    Namespace: AS2.Visuals
    Assembly: .dll
    Syntax
    public class PSetDragHandler

    Constructors

    | Edit this page View Source

    PSetDragHandler(AmoebotSimulator)

    Declaration
    public PSetDragHandler(AmoebotSimulator sim)
    Parameters
    Type Name Description
    AmoebotSimulator sim

    Fields

    | Edit this page View Source

    drag_active

    Declaration
    private bool drag_active
    Field Value
    Type Description
    bool
    | Edit this page View Source

    drag_circuitData

    Declaration
    private RendererCircuits_Instance.ParticleCircuitData drag_circuitData
    Field Value
    Type Description
    RendererCircuits_Instance.ParticleCircuitData
    | Edit this page View Source

    drag_innerPin

    Declaration
    private RendererCircuits_Instance.ParticleCircuitData.PSetInnerPinRef drag_innerPin
    Field Value
    Type Description
    RendererCircuits_Instance.ParticleCircuitData.PSetInnerPinRef
    | 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
    Type Description
    Vector2
    | Edit this page View Source

    quad

    Declaration
    private Mesh quad
    Field Value
    Type Description
    Mesh
    | Edit this page View Source

    scale

    Declaration
    private float scale
    Field Value
    Type Description
    float
    | Edit this page View Source

    sim

    Declaration
    private AmoebotSimulator sim
    Field Value
    Type Description
    AmoebotSimulator

    Methods

    | Edit this page View Source

    AbortDrag()

    Instantly cancels the current drag event.

    Declaration
    public void AbortDrag()
    | 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.

    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.11
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX