AbstractAffection/Scripts/character.gd
2025-02-15 19:20:49 +01:00

24 lines
565 B
GDScript

extends TextureRect
@export var positive_states: Array[Texture2D]
@export var neutral_states: Array[Texture2D]
@export var negative_states: Array[Texture2D]
var abstraction: int
func _next_page_pos() -> void:
self.texture = positive_states[abstraction]
func _next_page_neu() -> void:
self.texture = neutral_states[abstraction]
func _next_page_neg() -> void:
self.texture = negative_states[abstraction]
func increase() -> void:
if abstraction < neutral_states.size() - 1:
abstraction += 1
func decrease() -> void:
if abstraction > 0:
abstraction -= 1