diff --git a/.godot/editor/game_world.tscn-editstate-bdbf2ba254a2078c85b005689e1549ff.cfg b/.godot/editor/game_world.tscn-editstate-bdbf2ba254a2078c85b005689e1549ff.cfg index 91041d0..ce4a74e 100644 --- a/.godot/editor/game_world.tscn-editstate-bdbf2ba254a2078c85b005689e1549ff.cfg +++ b/.godot/editor/game_world.tscn-editstate-bdbf2ba254a2078c85b005689e1549ff.cfg @@ -8,7 +8,7 @@ Anim={ "grid_snap_active": false, "grid_step": Vector2(8, 8), "grid_visibility": 1, -"ofs": Vector2(-531.369, -614.342), +"ofs": Vector2(-185.733, -267.442), "primary_grid_steps": 8, "show_edit_locks": true, "show_guides": true, @@ -32,7 +32,7 @@ Anim={ "snap_rotation_step": 0.261799, "snap_scale": false, "snap_scale_step": 0.1, -"zoom": 0.5 +"zoom": 0.66742 } 3D={ "fov": 70.01, diff --git a/Scripts/game_world.gd b/Scripts/game_world.gd index 639da0d..deff1d5 100644 --- a/Scripts/game_world.gd +++ b/Scripts/game_world.gd @@ -4,9 +4,10 @@ signal condensedCupcake1() #Cupcake Values var ccVanNum: int = 0 +var ccVanValue: int = 1 var ccChocNum: int = 0 -#Cupcake Prices +#Cupcake Upgrade Prices var ccVanPrice: int = 10 var ccVanPrice2: int = 15 var ccVanPrice3: int = 15 @@ -22,6 +23,7 @@ var ccChocolate var ccchoc #Other +@onready var timer = get_node("Cupcake Spawn Timer") var horseAttached = true var horse_instance var mouse_position = Vector2.ZERO @@ -70,7 +72,6 @@ func collectCupcakes(): func _on_timeout(): - var timer = get_node("Cupcake Spawn Timer") spawnCupcakes() collectCupcakes() timer.start @@ -81,7 +82,7 @@ func _on_play_area_body_exited(body): func _on_cupcake_cc_van_collected(): - ccVanNum += 1 + ccVanNum += ccVanValue ccCount -= 1 collectCupcakes() @@ -90,21 +91,23 @@ func _on_upgrades_one_more_cupcake(): if ccVanNum >= ccVanPrice: ccSpawnRate += 1 ccVanNum -= ccVanPrice - ccVanPrice = ccVanPrice * 2 - $Upgrades/Control/ScrollContainer/VanGrid/VanUp1/Price.text = str(ccVanPrice) + ccVanPrice = ccVanPrice * PI + $Upgrades/Control/ScrollContainer/VanGrid/VanUp1/Price.text = str(ccVanPrice) collectCupcakes() func _on_upgrades_faster_cupcake(): - pass # Replace with function body. - - -func _on_upgrades_condensed_cupcake(): - pass + if ccVanNum >= ccVanPrice2: + ccVanNum -= ccVanPrice2 + ccVanPrice2 = ccVanPrice2 * PI + timer.wait_time = timer.wait_time - (timer.wait_time * 0.01) + $Upgrades/Control/ScrollContainer/VanGrid/VanUp2/Price.text = str(ccVanPrice2) + collectCupcakes() func _on_upgrades_condensed_cupcake_1(): if ccVanNum >= ccVanPrice3: ccVanNum -= ccVanPrice3 - ccVanPrice2 = ccVanPrice3 * 2 - emit_signal("condensedCupcakes1") - $Upgrades/Control/ScrollContainer/VanGrid/VanUp3/Price.text = str(ccVanPrice3) + ccVanPrice3 = ccVanPrice3 * PI + ccVanValue += 1 + $Upgrades/Control/ScrollContainer/VanGrid/VanUp3/Price.text = str(ccVanPrice3) + collectCupcakes()