summaryrefslogtreecommitdiff
path: root/src/entities/food/scripts/food_manager.gd
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2022-06-05 14:09:41 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2022-06-05 14:09:41 -0600
commit14538d486de312af41ce012836861468b8fb7897 (patch)
tree569d09c43fd7724a5fbb0898f5c1d1db3fd64b3d /src/entities/food/scripts/food_manager.gd
parent4b42a8ba26f21e2c6c766fa747c8b93a115a53b2 (diff)
finish all necessary for playability
Diffstat (limited to 'src/entities/food/scripts/food_manager.gd')
-rw-r--r--src/entities/food/scripts/food_manager.gd7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/entities/food/scripts/food_manager.gd b/src/entities/food/scripts/food_manager.gd
index a605f9e..e6c7248 100644
--- a/src/entities/food/scripts/food_manager.gd
+++ b/src/entities/food/scripts/food_manager.gd
@@ -41,7 +41,10 @@ func _place_new_basic_food() -> void:
var loc: Vector2 = pos_loc[1]
# need to set the position first, else it will spawn on the middle and the moved
- food.set_properties(pos, loc, false, type)
+ if type == FoodBasic.Type.RAT:
+ food.set_properties(pos, loc, false, type, Global.POINTS_TO_GROW / 2)
+ else:
+ food.set_properties(pos, loc, false, type)
add_child(food)
food.update_texture()
current_basic_food.append(loc)
@@ -57,7 +60,7 @@ func _place_new_special_food() -> void:
var loc: Vector2 = pos_loc[1]
# need to set the position first, else it will spawn on the middle and the moved
- food.set_properties(pos, loc, true, type, Global.POINTS_TO_GROW)
+ food.set_properties(pos, loc, true, type, Global.POINTS_TO_GROW, Global.POINTS_TO_GROW / Global.POINTS_TO_GROW)
add_child(food)
food.update_texture()
current_special_food.append(loc)