Add cap sprite to child scene and update project configuration

This commit is contained in:
2025-04-26 03:52:45 +02:00
parent d95176fba0
commit 0c1192536c
374 changed files with 11968 additions and 1276 deletions

View File

@@ -0,0 +1,47 @@
@tool
class_name GUIDEInputTouchPosition
extends GUIDEInputTouchBase
const GUIDETouchState = preload("guide_touch_state.gd")
func _begin_usage():
_value = Vector3.INF
func _input(event:InputEvent) -> void:
# update touch state
if not GUIDETouchState.process_input_event(event):
# not touch-related
return
# update finger position
var position := GUIDETouchState.get_finger_position(finger_index, finger_count)
if not position.is_finite():
_value = Vector3.INF
return
_value = Vector3(position.x, position.y, 0)
func is_same_as(other:GUIDEInput):
return other is GUIDEInputTouchPosition and \
other.finger_count == finger_count and \
other.finger_index == finger_index
func _to_string():
return "(GUIDEInputTouchPosition finger_count=" + str(finger_count) + \
" finger_index=" + str(finger_index) +")"
func _editor_name() -> String:
return "Touch Position"
func _editor_description() -> String:
return "Position of a touching finger."
func _native_value_type() -> GUIDEAction.GUIDEActionValueType:
return GUIDEAction.GUIDEActionValueType.AXIS_2D