more work
This commit is contained in:
@@ -5,7 +5,7 @@ const questor_template = preload("res://templates/questor_sprite.tscn")
|
||||
@onready var questorSprite : QuestorSprite
|
||||
@onready var setting = $Setting
|
||||
var quest : Quest
|
||||
|
||||
@export var base_speed : float
|
||||
|
||||
func setup(qst : Quest) -> void:
|
||||
quest = qst
|
||||
@@ -14,6 +14,9 @@ func setup(qst : Quest) -> void:
|
||||
questorSprite.setup(quest.questor)
|
||||
add_child(questorSprite)
|
||||
questorSprite.global_position = $QuestorPosition.global_position
|
||||
for child in %Layers.get_children():
|
||||
if child is Parallax2D:
|
||||
child.autoscroll.x = -base_speed * child.scroll_scale.x
|
||||
|
||||
|
||||
func set_questor_animation(anim_name : String) -> void:
|
||||
|
||||
@@ -54,3 +54,6 @@ func check_levelup() -> void:
|
||||
|
||||
func _on_level_up() -> void:
|
||||
show_levelup_banner()
|
||||
|
||||
func _on_questor_changed() -> void:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user