All checks were successful
Build / build (push) Successful in 1m21s
#23: Add a log for when points are given to players #25: Fixed some graphical stuff #26: Changed so the same character can be on a song multiple times #27: Turning off statistics after win
37 lines
811 B
GDScript
37 lines
811 B
GDScript
extends ScrollContainer
|
|
|
|
var SCROLL: float = 0
|
|
var delay: float = 0.02 #seconds
|
|
var wait: float = 0
|
|
|
|
var SPEED: int = 1
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
wait = delay
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta: float) -> void:
|
|
wait -= delta
|
|
if wait < 0:
|
|
wait = delay
|
|
#SCROLL DOWN
|
|
if SCROLL == 1:
|
|
if (scroll_vertical + get_v_scroll_bar().page) < get_v_scroll_bar().max_value:
|
|
scroll_vertical += SPEED
|
|
else:
|
|
scroll_back_up()
|
|
#SCROLL UP
|
|
elif SCROLL == -1:
|
|
if scroll_vertical != 0:
|
|
scroll_vertical -= SPEED
|
|
else:
|
|
scroll_to_bottom()
|
|
|
|
func scroll_back_up() -> void:
|
|
SCROLL = -1
|
|
|
|
func scroll_to_bottom() -> void:
|
|
scroll_vertical = 0 #Reset to top first.
|
|
SCROLL = 1
|