OpticTraveler/Florian/PointsLogic/point_thing.gd

27 lines
636 B
GDScript3
Raw Normal View History

2025-09-15 18:31:41 +02:00
class_name PointPicture
extends Node3D
2025-09-16 11:56:10 +02:00
@onready var red_circle: Sprite3D = $RedCircle
2025-09-15 18:31:41 +02:00
@onready var on_screen: VisibleOnScreenNotifier3D = $VisibleOnScreenNotifier3D
@export var points_worth : int= 10
@export var points_name = "Debug Object"
@export var points_multiplier : float = 1
2025-09-15 18:31:41 +02:00
func _ready() -> void:
PictureTakeablesArray._add_point_picture(self)
func picture_taken() -> bool:
2025-09-16 11:56:10 +02:00
var in_picture = on_screen.is_on_screen()
2025-09-17 17:13:49 +02:00
hide_red_circle()
#print(in_picture)
2025-09-16 11:56:10 +02:00
return in_picture
func show_red_cicle():
2025-09-17 17:13:49 +02:00
#print("Showing red circle")
2025-09-16 11:56:10 +02:00
red_circle.show()
func hide_red_circle():
2025-09-17 17:13:49 +02:00
#print("Hiding red circle")
2025-09-16 11:56:10 +02:00
red_circle.hide()