diff options
author | David <david003@gmx.net> | 2022-07-16 01:24:18 +0200 |
---|---|---|
committer | David <david003@gmx.net> | 2022-07-16 01:32:34 +0200 |
commit | cdc2b9ea0bd97b982411ba4b6e03643937c105ad (patch) | |
tree | dd2b7b9918263431071c2effbbe3702e099656f7 /godot/scenes/scripts/roblox-cube.gd | |
parent | 81b38765b366bc2823f7a8a3d5ad849a05218c1e (diff) | |
download | 2022-cdc2b9ea0bd97b982411ba4b6e03643937c105ad.tar.gz 2022-cdc2b9ea0bd97b982411ba4b6e03643937c105ad.tar.bz2 2022-cdc2b9ea0bd97b982411ba4b6e03643937c105ad.zip |
uuuhh
Diffstat (limited to '')
-rw-r--r-- | godot/scenes/scripts/roblox-cube.gd | 24 |
1 files changed, 24 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..ac12159 --- /dev/null +++ b/godot/scenes/scripts/roblox-cube.gd @@ -0,0 +1,24 @@ +extends Spatial + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" +func on_collision(other): + print("b") + 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 = get_node("RigidBody") + rb.apply_impulse(Vector3(), Vector3(40, 1, 10)) + rb.connect("body_entered", self, "on_collision") + print("a") + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass + |