From 898877f09808691a5e5d45850d27ae85f270db16 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Thu, 2 Jun 2022 02:35:03 -0600 Subject: add food system --- src/entities/food/scenes/Food.tscn | 16 ++++++++++++++++ src/entities/food/scenes/FoodManager.tscn | 8 ++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/entities/food/scenes/Food.tscn create mode 100644 src/entities/food/scenes/FoodManager.tscn (limited to 'src/entities/food/scenes') 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 ) -- cgit v1.2.3-70-g09d2