ManipulationState
Returns an array of runtime validation issues for this resource
Returns an array of runtime validation issues for this resource
Version: v5.0.0
Inherits: GBResource
Source: manipulation_state.gd
Parsing: AST-based for maximum accuracy with symbol typing
Variables
_owner_context:
data:
Data of the active manipulation
active_manipulatable: Manipulatable:
The current targeted (hovered, etc) manipulatable component, if any
Type: Manipulatable:
_active_target_node:
Internal backing field for active_target_node property
active_target_node:
Accepts either a Manipulatable directly or a Node/Node2D whose descendant has a Manipulatable.
parent:
This ensures indicators rotate/flip with manipulated objects via transform inheritance.
Signals
data_changed(manipulation: ManipulationData)
Null means there is no manipulation currently active on the state.
Parameters:
manipulation: ManipulationData
active_manipulatable_changed(active: Manipulatable)
The manipulatable that is being hovered over
Parameters:
active: Manipulatable
active_target_node_changed(active: Node)
Signal for when the currently active target node changes
Parameters:
active: Node
parent_changed(parent: ManipulationParent)
during a manipulation changes
Parameters:
parent: ManipulationParent
started(data: ManipulationData)
Emitted when a manipulation action is started
Parameters:
data: ManipulationData
confirmed(data: ManipulationData)
Emitted when a manipulation action is confirmed
Parameters:
data: ManipulationData
finished(data: ManipulationData)
Emitted when a manipulation action is finished
Parameters:
data: ManipulationData
canceled(data: ManipulationData)
Emitted when a manipulation action is canceled
Parameters:
data: ManipulationData
failed(data: ManipulationData)
Emitted when a manipulation action fails
Parameters:
data: ManipulationData
Methods
_init
Signature: _init(p_owner_context: GBOwnerContext) -> void
Returns: void
Parameters:
p_owner_context: GBOwnerContext
get_manipulator
Signature: get_manipulator() -> GBOwner
Gets the active manipulator from the _owner_context GBOwnerContext.
Returns: GBOwner
set_targeted
Signature: set_targeted(p_node : Node: Variant) -> void
Will set both the active_target_node and the active_manipulatable if possible
Returns: void
Parameters:
p_node : Node: Variant
is_targeted_movable
Signature: is_targeted_movable() -> bool
return: bool - True if targeted object can be moved, false otherwise
Returns: bool
validate_setup
Signature: validate_setup() -> bool
Checks if the state is ready for manipulation.
Returns: bool
_on_data_status_changed
Signature: _on_data_status_changed(p_status: GBEnums.Status: Variant) -> void
p_status: GBEnums.Status - New status of the manipulation data
Returns: void
Parameters:
p_status: GBEnums.Status: Variant
get_editor_issues
Signature: get_editor_issues() -> Array
Returns an array of editor-time validation issues for this resource
Returns: Array
get_runtime_issues
Signature: get_runtime_issues() -> Array
Returns an array of runtime validation issues for this resource
Returns: Array