This repository has been archived on 2023-02-28. You can view files and clone it, but cannot push or open issues or pull requests.
Boups/Characters/Villain.gd
2023-02-25 01:04:08 +01:00

33 lines
540 B
GDScript
Executable file

extends Node2D
onready var me = $AnimatedSprite
onready var timer
# Called when the node enters the scene tree for the first time.
func _ready():
timer = 0
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
timer += delta
match me.get_frame():
0:
# Vert
if timer >= 5:
timer = 0
me.set_frame(1)
1:
# Orange
if timer >= .5:
timer = 0
me.set_frame(2)
2:
# Rouge
if timer >= 2:
timer = 0
me.set_frame(0)
_:
print("Not handled frame")