diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2022-06-02 02:35:03 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2022-06-02 02:35:03 -0600 |
commit | 898877f09808691a5e5d45850d27ae85f270db16 (patch) | |
tree | e4f9005273815c35327b5bdf65026c93301cb593 /src/entities/food/scenes | |
parent | 2c5d588bc593929a96f0e58d7d1ab52f269add55 (diff) |
add food system
Diffstat (limited to 'src/entities/food/scenes')
-rw-r--r-- | src/entities/food/scenes/Food.tscn | 16 | ||||
-rw-r--r-- | src/entities/food/scenes/FoodManager.tscn | 8 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/entities/food/scenes/Food.tscn b/src/entities/food/scenes/Food.tscn new file mode 100644 index 0000000..bc330e2 --- /dev/null +++ b/src/entities/food/scenes/Food.tscn @@ -0,0 +1,16 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://entities/food/scripts/food.gd" type="Script" id=2] + +[sub_resource type="CircleShape2D" id=1] +radius = 7.0 + +[node name="Food" type="Area2D"] +collision_layer = 256 +collision_mask = 0 +script = ExtResource( 2 ) + +[node name="Sprite" type="Sprite" parent="."] + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource( 1 ) diff --git a/src/entities/food/scenes/FoodManager.tscn b/src/entities/food/scenes/FoodManager.tscn new file mode 100644 index 0000000..3287271 --- /dev/null +++ b/src/entities/food/scenes/FoodManager.tscn @@ -0,0 +1,8 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://entities/food/scenes/Food.tscn" type="PackedScene" id=1] +[ext_resource path="res://entities/food/scripts/food_manager.gd" type="Script" id=2] + +[node name="FoodManager" type="Node2D"] +script = ExtResource( 2 ) +FOOD = ExtResource( 1 ) |