Class Manipulatable
- Namespace
- GridPlacement.GDScript
- Assembly
- MoonBark.GridPlacement.GDScript.dll
class Manipulatable extends GBGameNode
Manipulatable
Fields
keep_during_preview
Component node that makes a object movable, demolishable, or other system actions to be performed on the object Special marker that tells building system to keep this script during preview
const keep_during_preview = true
Properties
settings
Rule settings for replacing this object in move mode, etc
@export var settings: ManipulatableSettings
root
The root of the object that should be manipulated by any actions. This manipulatable component is usually a child of the root.
@export var root: Node :
current
var current: Node = self
copy
var copy = root.duplicate()
copy_manipulatable
var copy_manipulatable: Manipulatable = GBSearchUtils.find_first(copy, Manipulatable)
issues
var issues: Array[String] = []
issues
var issues: Array[String] = []
null_issues
var null_issues: Array[String] = GBValidation.check_not_null(self, ["root"])
new_transform
var new_transform: Transform2D = root.global_transform if root else Transform2D.IDENTITY
root_2d
var root_2d = root as Node2D
Methods
resolve_gb_dependencies
func resolve_gb_dependencies(p_container : PlacementContainer) -> void:
Parameters
p_container
Returns
is_root_hierarchy_valid
func is_root_hierarchy_valid() -> bool:
Returns
create_copy
func create_copy(p_name_postfix : String) -> Manipulatable:
Parameters
p_name_postfix
Returns
get_move_rules
func get_move_rules() -> Array[TileCheckRule]:
Returns
is_demolishable
func is_demolishable() -> bool:
Returns
is_movable
func is_movable() -> bool:
Returns
validate_setup
func validate_setup() -> bool:
Returns
get_issues
func get_issues() -> Array[String]:
Returns
complete_manipulation
func complete_manipulation( p_position: Vector2,
Events
manipulation_finished
Emitted when this object's manipulation is finished (placed/moved) This allows the root object to respond to being manipulated Parameters: - old_transform: Transform2D - The transform before manipulation - new_transform: Transform2D - The transform after manipulation
signal manipulation_finished(old_transform: Transform2D, new_transform: Transform2D)