massive work towards godot 4
This commit is contained in:
14
scripts/Exit.gd
Normal file
14
scripts/Exit.gd
Normal file
@@ -0,0 +1,14 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
func _ready():
|
||||
$Area2D.connect("body_entered",Callable(self,"on_collide"))
|
||||
|
||||
|
||||
func on_collide(body):
|
||||
if body.has_method("victoryCondition"):
|
||||
MusicPlayer.stop()
|
||||
MusicPlayer.stream = load("res://Music/DOS-88/Smooth Sailing.ogg")
|
||||
MusicPlayer.volume_db = 0
|
||||
MusicPlayer.play()
|
||||
body.victoryCondition()
|
||||
Reference in New Issue
Block a user