aboutsummaryrefslogtreecommitdiffstats
path: root/godot/scenes/scripts/roblox-cube.gd
blob: ac12159055f0afa852ef8b04700e3fc57812a9b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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