Table of Contents

Class ManipulationState

Namespace
GridPlacement.GDScript
Assembly
MoonBark.GridPlacement.GDScript.dll
class ManipulationState extends GBResource
ManipulationState

Properties

data

Data of the active manipulation

var data: ManipulationData:

active_manipulatable

The current targeted (hovered, etc) manipulatable component, if any

var active_manipulatable: Manipulatable:

active_target_node

Compatibility alias required by older tests referencing 'current_target'. Accepts either a Manipulatable directly or a Node/Node2D whose descendant has a Manipulatable.

var active_target_node: Node:

m

var m: Manipulatable = GBSearchUtils.find_first(value, Manipulatable)

parent

Node which is actually manipulated to effect all children including the active target node and any other nodes that need to move to be updated with the base The ManipulationParent node responsible for coordinating transforms during manipulation. Enforces ManipulationParent class to ensure proper transform coordination methods are available. This ensures indicators rotate/flip with manipulated objects via transform inheritance.

var parent: ManipulationParent:

passing

var passing = true

issues

var issues: Array[String] = []

issues

var issues: Array[String] = []

Methods

get_manipulator

func get_manipulator() -> GBOwner:

Returns

set_targeted

func set_targeted(p_node : Node) -> void:

Parameters

p_node

Returns

is_targeted_movable

func is_targeted_movable() -> bool:

Returns

validate_setup

func validate_setup() -> bool:

Returns

get_editor_issues

func get_editor_issues() -> Array[String]:

Returns

get_runtime_issues

func get_runtime_issues() -> Array[String]:

Returns

Events

data_changed

The manipulation state holds reference to the object being manipulated and its temporary manipulated copy. It also is the source of signals regarding object manipulation like when moving or demolishing an object is started, canceled, or stopped. Emitted when the active manipulation on an object changes Null means there is no manipulation currently active on the state.

signal data_changed(manipulation: ManipulationData)

active_manipulatable_changed

The manipulatable that is being hovered over

signal active_manipulatable_changed(active: Manipulatable)

active_target_node_changed

Signal for when the currently active target node changes

signal active_target_node_changed(active: Node)

parent_changed

When the node for performing transform adjustments to (rotate, flip, etc) during a manipulation changes

signal parent_changed(parent: ManipulationParent)

started

Emitted when a manipulation action is started

signal started(data: ManipulationData)

confirmed

Emitted when a manipulation action is confirmed

signal confirmed(data: ManipulationData)

finished

Emitted when a manipulation action is finished

signal finished(data: ManipulationData)

canceled

Emitted when a manipulation action is canceled

signal canceled(data: ManipulationData)

failed

Emitted when a manipulation action fails

signal failed(data: ManipulationData)