Table of Contents

Class TargetHighlighter

Namespace
GridPlacement.GDScript
Assembly
MoonBark.GridPlacement.GDScript.dll

When a target node is set on the build state, marks it by colors based on the settings of its Manipulatable node (or lack thereof)

class TargetHighlighter extends GBSystemsComponent
TargetHighlighter

Properties

mode_state

var mode_state: ModeState

targeting_state

var targeting_state: GridTargetingState :

manipulation_state

var manipulation_state: ManipulationState :

highlight_settings

Holds color settings for how a highlighted target should be displayed in the game world

var highlight_settings: HighlightSettings

current_target

The currently highlighter target. When set to a new value, the old one's modulate clears automatically

var current_target: CanvasItem :

validation_issues

var validation_issues = get_runtime_issues()

manipulatable

var manipulatable: Manipulatable = GBSearchUtils.find_first(p_target, Manipulatable)

settings

var settings: ManipulatableSettings

old

var old = current_target

building_node_script_path

var building_node_script_path = "res://addons/grid_building/components/building_node.gd"

Methods

resolve_gb_dependencies

func resolve_gb_dependencies(p_container : PlacementContainer) -> void:

Parameters

p_container

Returns

set_movable_display

func set_movable_display(p_target : CanvasItem, p_movable : bool) -> Color:

Parameters

p_target
p_movable

Returns

set_demolish_display

func set_demolish_display(p_target : CanvasItem, p_demolishable : bool) -> Color:

Parameters

p_target
p_demolishable

Returns

set_build_preview_display

func set_build_preview_display(p_target : CanvasItem) -> void:

Parameters

p_target

Returns

set_info_display

func set_info_display(p_target : CanvasItem) -> void:

Parameters

p_target

Returns

set_actionable_colors

func set_actionable_colors(p_target : CanvasItem) -> Color:

Parameters

p_target

Returns

should_highlight

func should_highlight(p_data : ManipulationData, p_target : CanvasItem) -> bool:

Parameters

p_data
p_target

Returns

is_locked

func is_locked() -> bool:

Returns

get_runtime_issues

func get_runtime_issues() -> Array[String]:

Returns