This repository has been archived on 2024-04-19. You can view files and clone it, but cannot push or open issues or pull requests.
Jessist/Scripts/StarScript.gd
2022-06-18 13:05:48 +02:00

17 lines
581 B
GDScript

######################
### Jessist Script ###
######################
# This script is part of Jessist
# Jessist is licensed under GNU GPLv3
#
# This script manages the star component
extends Sprite
export var nextLevel = ""
func playerHitZoneEntered(body):
gameController.logCall("StarScript","playerHitZoneEntered",body)
if body.name == "Player":
gameController.logInfo("StarScript","playerHitZoneEntered","Star collected, changing level")
#get_tree().change_scene("res://Scenes/" + nextLevel + ".tscn")
gameController.switchScene("res://Scenes/" + nextLevel + ".tscn")