first commit
This commit is contained in:
7
Cups/Cup.gd
Normal file
7
Cups/Cup.gd
Normal file
@@ -0,0 +1,7 @@
|
||||
extends Area2D
|
||||
|
||||
|
||||
func _on_Cup_body_entered(body: Node) -> void:
|
||||
if body.is_in_group("Balls"):
|
||||
print("Yatta!")
|
||||
body.queue_free()
|
18
Cups/Cup.tscn
Normal file
18
Cups/Cup.tscn
Normal file
@@ -0,0 +1,18 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Art/Extras-07.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Cups/Cup.gd" type="Script" id=2]
|
||||
|
||||
[node name="Cup" type="Area2D" groups=[
|
||||
"Buckets",
|
||||
]]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
texture = ExtResource( 1 )
|
||||
flip_v = true
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
|
||||
polygon = PoolVector2Array( 28, 4, -28, 4, 0, 23 )
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_Cup_body_entered"]
|
Reference in New Issue
Block a user