From 14538d486de312af41ce012836861468b8fb7897 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Sun, 5 Jun 2022 14:09:41 -0600 Subject: finish all necessary for playability --- src/entities/food/scripts/food_manager.gd | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/entities/food/scripts/food_manager.gd') 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) -- cgit v1.2.3-54-g00ecf