-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathLoch.gd
More file actions
26 lines (20 loc) · 699 Bytes
/
Loch.gd
File metadata and controls
26 lines (20 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
extends StaticBody2D
func _ready():
# Called every time the node is added to the scene.
# Initialization here
pass
func _on_Disabler_body_entered( body ):
pass # replace with function body
if body.is_in_group("players"):
print("player fell into loch: ", body.name)
body.set_collision_mask_bit(0, false) ## ground
body.set_collision_layer_bit(0, false) ## ground
body.disableInputs()
func _on_Killer_body_entered( body ):
pass # replace with function body
if body.is_in_group("players"):
body.kill()
func _on_Disabler_body_exited( body ):
pass # replace with function body
# body.set_collision_mask_bit(0, true) ## ground
# body.set_collision_layer_bit(0, true) ## ground