diff options
author | Scarabeaver <kopakoraello@googlemail.com> | 2022-07-16 13:43:54 +0200 |
---|---|---|
committer | Scarabeaver <kopakoraello@googlemail.com> | 2022-07-16 13:43:54 +0200 |
commit | f2ad01fe09709bc32b9b06a0aecc4c1b4d0a870d (patch) | |
tree | 0cc77b371af59dc1e81039374f2487c7322f897f /godot/scenes/scripts/roblox-cube.gd | |
parent | 023eb2adeac51440f739f18d78aef815c6f0309b (diff) | |
parent | 4f2bc986240c61bd455742c0cee3c3c796fc5e6b (diff) | |
download | 2022-f2ad01fe09709bc32b9b06a0aecc4c1b4d0a870d.tar.gz 2022-f2ad01fe09709bc32b9b06a0aecc4c1b4d0a870d.tar.bz2 2022-f2ad01fe09709bc32b9b06a0aecc4c1b4d0a870d.zip |
Merge branch 'main' of https://codeberg.org/code-your-friends/gmtk2022
Diffstat (limited to '')
-rw-r--r-- | godot/scenes/scripts/roblox-cube.gd | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/godot/scenes/scripts/roblox-cube.gd b/godot/scenes/scripts/roblox-cube.gd new file mode 100644 index 0000000..453067b --- /dev/null +++ b/godot/scenes/scripts/roblox-cube.gd @@ -0,0 +1,22 @@ +extends Spatial + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" +func on_collision(other): + var ap = get_parent().get_node("AudioStreamPlayer") + ap.play() + + +# Called when the node enters the scene tree for the first time. +func _ready(): + var rb = self + rb.apply_impulse(Vector3(), Vector3(40, 1, 10)) + rb.connect("body_entered", self, "on_collision") + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass + |