27 lines
464 B
GDScript
27 lines
464 B
GDScript
extends CharacterBody3D
|
|
|
|
@export var text: Resource
|
|
@export var photo_index: int = 0
|
|
|
|
@export var animation_payer: AnimationPlayer
|
|
|
|
func _ready():
|
|
animation_payer.play("photo_hover")
|
|
|
|
func pointing(point: bool):
|
|
if point:
|
|
animation_payer.play("photo_point", 1)
|
|
else:
|
|
animation_payer.play("photo_hover", 1)
|
|
|
|
func get_text() -> Resource:
|
|
return text;
|
|
|
|
func destroy():
|
|
queue_free()
|
|
|
|
func is_photo():
|
|
return true
|
|
|
|
func get_photo_index():
|
|
return photo_index
|