17 lines
581 B
GDScript
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")
|