bad commit message
This commit is contained in:
parent
2491055a7e
commit
f2ef5dfbb3
11
Items/Item.gd
Normal file
11
Items/Item.gd
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
extends Area2D
|
||||||
|
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
func _on_Item_body_entered(body):
|
||||||
|
if body.is_in_group("Balls"):
|
||||||
|
print("item picked up")
|
||||||
|
queue_free()
|
18
Items/Item.tscn
Normal file
18
Items/Item.tscn
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://icon.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://Items/Item.gd" type="Script" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="CapsuleShape2D" id=1]
|
||||||
|
radius = 35.0
|
||||||
|
|
||||||
|
[node name="Item" type="Area2D"]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
|
texture = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="." to="." method="_on_Item_body_entered"]
|
@ -1,10 +1,11 @@
|
|||||||
[gd_scene load_steps=8 format=2]
|
[gd_scene load_steps=9 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://ServeArea.gd" type="Script" id=1]
|
[ext_resource path="res://ServeArea.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://Cups/Cup.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://Cups/Cup.tscn" type="PackedScene" id=2]
|
||||||
[ext_resource path="res://Art/LevelBackground.png" type="Texture" id=3]
|
[ext_resource path="res://Art/LevelBackground.png" type="Texture" id=3]
|
||||||
[ext_resource path="res://Levels/Level001.tscn" type="PackedScene" id=4]
|
[ext_resource path="res://Levels/Level001.tscn" type="PackedScene" id=4]
|
||||||
[ext_resource path="res://GUI.tscn" type="PackedScene" id=5]
|
[ext_resource path="res://GUI.tscn" type="PackedScene" id=5]
|
||||||
|
[ext_resource path="res://Items/Item.tscn" type="PackedScene" id=6]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=1]
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
extents = Vector2( 269.25, 124 )
|
extents = Vector2( 269.25, 124 )
|
||||||
@ -66,6 +67,9 @@ position = Vector2( 266, 918 )
|
|||||||
|
|
||||||
[node name="GUI" parent="." instance=ExtResource( 5 )]
|
[node name="GUI" parent="." instance=ExtResource( 5 )]
|
||||||
|
|
||||||
|
[node name="Item" parent="." instance=ExtResource( 6 )]
|
||||||
|
position = Vector2( 370, 627 )
|
||||||
|
|
||||||
[connection signal="mouse_exited" from="ServeArea" to="ServeArea" method="_on_ServeArea_mouse_exited"]
|
[connection signal="mouse_exited" from="ServeArea" to="ServeArea" method="_on_ServeArea_mouse_exited"]
|
||||||
[connection signal="button_down" from="ServeArea/TextureButton" to="ServeArea" method="_on_TextureButton_button_down"]
|
[connection signal="button_down" from="ServeArea/TextureButton" to="ServeArea" method="_on_TextureButton_button_down"]
|
||||||
[connection signal="button_up" from="ServeArea/TextureButton" to="ServeArea" method="_on_TextureButton_button_up"]
|
[connection signal="button_up" from="ServeArea/TextureButton" to="ServeArea" method="_on_TextureButton_button_up"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user