27 lines
623 B
GDScript
27 lines
623 B
GDScript
extends Control
|
|
@onready var state_machine: StateMachine = $state_machine
|
|
@onready var fight_card: TextureRect = $fight_card
|
|
|
|
|
|
func _on_fight_card_mouse_entered() -> void:
|
|
state_machine.send_message("mouse_enter")
|
|
pass # Replace with function body.
|
|
|
|
|
|
func _on_fight_card_mouse_exited() -> void:
|
|
|
|
state_machine.send_message("mouse_exit")
|
|
pass # Replace with function body.
|
|
|
|
func up():
|
|
|
|
|
|
pass
|
|
var last_scale_tween:Tween
|
|
func scale_to(sc:float):
|
|
if last_scale_tween!=null:
|
|
last_scale_tween.kill()
|
|
last_scale_tween=get_tree().create_tween()
|
|
last_scale_tween.tween_property(fight_card,"scale",Vector2(sc,sc),0.1)
|
|
|