From f259c1a83fa9676a4e0f3343bf4ece064c042ce3 Mon Sep 17 00:00:00 2001 From: OnlyMares Date: Sat, 4 Mar 2023 02:32:47 -0600 Subject: [PATCH] Nightly push prepwork and touchups --- .godot/editor/create_recent.Node | 2 ++ .godot/editor/editor_layout.cfg | 4 +-- .godot/editor/filesystem_cache8 | 32 ++++++++++++------- .godot/editor/filesystem_update4 | 1 + ...state-bdbf2ba254a2078c85b005689e1549ff.cfg | 4 +-- ...lding-bdbf2ba254a2078c85b005689e1549ff.cfg | 2 +- .godot/editor/project_metadata.cfg | 2 +- .godot/editor/recent_dirs | 1 + .godot/editor/script_editor_cache.cfg | 28 ++++++++++++---- Scenes/Cupcakes/cupcake.tscn | 1 + Scenes/game_world.tscn | 10 +++--- Scripts/PlayArea.gd | 18 +++++++++++ Scripts/game_world.gd | 24 +++----------- Scripts/horse.gd | 1 + Scripts/varConst.gd | 11 +++++++ Scripts/varVar.gd | 11 +++++++ 16 files changed, 104 insertions(+), 48 deletions(-) create mode 100644 Scripts/PlayArea.gd create mode 100644 Scripts/varConst.gd create mode 100644 Scripts/varVar.gd diff --git a/.godot/editor/create_recent.Node b/.godot/editor/create_recent.Node index c3f31cd..3fa6923 100644 --- a/.godot/editor/create_recent.Node +++ b/.godot/editor/create_recent.Node @@ -1,3 +1,5 @@ +TextureButton +VBoxContainer Node2D Sprite2D CollisionShape2D diff --git a/.godot/editor/editor_layout.cfg b/.godot/editor/editor_layout.cfg index 75d9d4e..b2a5b45 100644 --- a/.godot/editor/editor_layout.cfg +++ b/.godot/editor/editor_layout.cfg @@ -14,7 +14,7 @@ dock_split_1=0 dock_split_4=0 dock_2="FileSystem" dock_3="Scene,Import" -dock_5="Inspector,Node,History,Commit (14)" +dock_5="Inspector,Node,History,Commit (15)" [EditorNode] @@ -22,7 +22,7 @@ open_scenes=["res://Scenes/game_world.tscn", "res://Scenes/horse.tscn", "res://S [ScriptEditor] -open_scripts=["res://Scripts/Cupcake Spawn Timer.gd", "res://Scripts/Cupcakes/cupcake.gd", "res://Scripts/game_world.gd", "res://Scripts/horse.gd", "res://README.md"] +open_scripts=["res://Scripts/Cupcake Spawn Timer.gd", "res://Scripts/Cupcakes/cupcake.gd", "res://Scripts/game_world.gd", "res://Scripts/horse.gd", "res://Scripts/PlayArea.gd", "res://README.md"] open_help=["Node"] script_split_offset=70 list_split_offset=0 diff --git a/.godot/editor/filesystem_cache8 b/.godot/editor/filesystem_cache8 index 33b1b8e..8245b09 100644 --- a/.godot/editor/filesystem_cache8 +++ b/.godot/editor/filesystem_cache8 @@ -1,5 +1,7 @@ 2a60927148abd1d33b818b535e306557 -::res://::1677817957 +::res://::1677895080 +export_presets.cfg::TextFile::-1::1677836748::0::1::::<><>:: +README.md::TextFile::-1::1677829846::0::1::::<><>:: ::res://addons/::1677750379 ::res://addons/godot-git-plugin/::1677750379 git_plugin.gdextension::GDExtension::-1::1677750379::0::1::::<><>:: @@ -16,13 +18,21 @@ Cupcake.png::CompressedTexture2D::2257367495948376976::1677756335::1677787255::1 ::res://Art/Locations/::1677787260 yard1.png::CompressedTexture2D::4372226739663751514::1677759042::1677787260::1::::<><>:: ::res://Art/Upgrades/::1677787246 -::res://Scenes/::1677817739 -game_world.tscn::PackedScene::7981802964863433317::1677817739::0::1::::<><>::res://Scripts/game_world.gd -horse.tscn::PackedScene::8568825373134700876::1677817739::0::1::::<><>::res://Scripts/horse.gd<>uid://cbpvwmngdb4ke -::res://Scenes/Cupcakes/::1677817739 -cupcake.tscn::PackedScene::8468695979515826288::1677817739::0::1::::<><>::uid://7fqro4fugv8k -::res://Scenes/Locations/::1677787474 -::res://Scenes/UI/::1677787492 -::res://Scripts/::1677795117 -game_world.gd::GDScript::-1::1677795117::0::1::::<>Node2D<>:: -horse.gd::GDScript::-1::1677753343::0::1::::<>CharacterBody2D<>:: +::res://Scenes/::1677894922 +game_world.tscn::PackedScene::7981802964863433317::1677894922::0::1::::<><>::res://Scripts/game_world.gd<>res://Scripts/Cupcake Spawn Timer.gd<>uid://dswkgkor3yejo<>res://Scripts/PlayArea.gd +horse.tscn::PackedScene::8568825373134700876::1677894219::0::1::::<><>::res://Scripts/horse.gd<>uid://cbpvwmngdb4ke +::res://Scenes/Cupcakes/::1677894219 +cupcake.tscn::PackedScene::8468695979515826288::1677894219::0::1::::<><>::res://Scripts/Cupcakes/cupcake.gd<>uid://7fqro4fugv8k +::res://Scenes/Locations/::1677894219 +yard.tscn::PackedScene::7883941411178408831::1677894219::0::1::::<><>::uid://b3j662tj6h5vq +::res://Scenes/UI/::1677894219 +ingame_ui.tscn::PackedScene::6815695514927101566::1677894219::0::1::::<><>:: +::res://Scripts/::1677895080 +constVar.gd::GDScript::-1::1677895026::0::1::::<>Node<>:: +Cupcake Spawn Timer.gd::GDScript::-1::1677829748::0::1::::<>Timer<>:: +game_world.gd::GDScript::-1::1677894219::0::1::::<>Node2D<>:: +horse.gd::GDScript::-1::1677889419::0::1::::<>CharacterBody2D<>:: +PlayArea.gd::GDScript::-1::1677893017::0::1::::<>Area2D<>:: +varVar.gd::GDScript::-1::1677895074::0::1::::<>Node<>:: +::res://Scripts/Cupcakes/::1677890080 +cupcake.gd::GDScript::-1::1677890080::0::1::::<>RigidBody2D<>:: diff --git a/.godot/editor/filesystem_update4 b/.godot/editor/filesystem_update4 index 8fac1e5..60c4d7d 100644 --- a/.godot/editor/filesystem_update4 +++ b/.godot/editor/filesystem_update4 @@ -8,3 +8,4 @@ res://Scripts/Cupcakes/cupcake.gd res://Scenes/Locations/yard.tscn res://README.md res://Scenes/UI/ingame_ui.tscn +res://Scripts/PlayArea.gd diff --git a/.godot/editor/game_world.tscn-editstate-bdbf2ba254a2078c85b005689e1549ff.cfg b/.godot/editor/game_world.tscn-editstate-bdbf2ba254a2078c85b005689e1549ff.cfg index 2515875..75cffa5 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(-673.548, -647.473), +"ofs": Vector2(-605.908, -556.88), "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.471937 +"zoom": 0.5 } 3D={ "fov": 70.01, diff --git a/.godot/editor/game_world.tscn-folding-bdbf2ba254a2078c85b005689e1549ff.cfg b/.godot/editor/game_world.tscn-folding-bdbf2ba254a2078c85b005689e1549ff.cfg index 9847aa0..a1a041b 100644 --- a/.godot/editor/game_world.tscn-folding-bdbf2ba254a2078c85b005689e1549ff.cfg +++ b/.godot/editor/game_world.tscn-folding-bdbf2ba254a2078c85b005689e1549ff.cfg @@ -1,5 +1,5 @@ [folding] -node_unfolds=[NodePath("."), PackedStringArray("Transform", "Material", "Texture", "Ordering", "Visibility", "Editor Description", "Process", "ccVanilla"), NodePath("PlayArea"), PackedStringArray("Input", "Collision")] +node_unfolds=[NodePath("."), PackedStringArray("Transform", "Material", "Texture", "Ordering", "Visibility", "Editor Description", "Process", "ccVanilla"), NodePath("Location"), PackedStringArray("Visibility"), NodePath("PlayArea"), PackedStringArray("Input", "Collision"), NodePath("PlayArea/Cupcake"), PackedStringArray("Collision"), NodePath("PlayArea/CollisionShape2D"), PackedStringArray("Transform", "Visibility")] resource_unfolds=["res://Scenes/game_world.tscn::RectangleShape2D_sh03e", PackedStringArray()] nodes_folded=[] diff --git a/.godot/editor/project_metadata.cfg b/.godot/editor/project_metadata.cfg index 57f3346..f09e8d1 100644 --- a/.godot/editor/project_metadata.cfg +++ b/.godot/editor/project_metadata.cfg @@ -22,7 +22,7 @@ recent_presets=PackedColorArray(0, 0, 0, 1, 0.2, 0.0156863, 0.286275, 0.431373, [recent_files] scenes=["res://Scenes/UI/ingame_ui.tscn", "res://Scenes/Locations/yard.tscn", "res://Scenes/Locations/y.tscn", "res://Scenes/Locations/Yard.tscn", "res://Scenes/Cupcakes/cupcake.tscn", "res://Scenes/horse.tscn", "res://Scenes/game_world.tscn", "res://Scenes/cupcake.tscn"] -scripts=["res://README.md", "res://Scripts/Cupcakes/cupcake.gd", "res://Scripts/Cupcake Spawn Timer.gd", "Node", "res://Scripts/game_world.gd", "res://Scripts/horse.gd"] +scripts=["res://Scripts/PlayArea.gd", "res://README.md", "res://Scripts/Cupcakes/cupcake.gd", "res://Scripts/Cupcake Spawn Timer.gd", "Node", "res://Scripts/game_world.gd", "res://Scripts/horse.gd"] [script_setup] diff --git a/.godot/editor/recent_dirs b/.godot/editor/recent_dirs index db05ef9..0b1103a 100644 --- a/.godot/editor/recent_dirs +++ b/.godot/editor/recent_dirs @@ -1,3 +1,4 @@ +res://Scripts res://Scenes/UI /home/shobie/CupcakeRevolution1 res://Scenes/Locations diff --git a/.godot/editor/script_editor_cache.cfg b/.godot/editor/script_editor_cache.cfg index f87b85c..3aa34c6 100644 --- a/.godot/editor/script_editor_cache.cfg +++ b/.godot/editor/script_editor_cache.cfg @@ -3,10 +3,10 @@ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 0, +"column": 10, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 5, +"row": 10, "scroll_position": 0.0, "selection": false, "syntax_highlighter": "GDScript" @@ -17,11 +17,11 @@ state={ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 0, +"column": 24, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 50, -"scroll_position": 4.0, +"row": 16, +"scroll_position": 0.0, "selection": false, "syntax_highlighter": "GDScript" } @@ -45,10 +45,10 @@ state={ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 14, +"column": 0, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 14, +"row": 13, "scroll_position": 0.0, "selection": false, "syntax_highlighter": "GDScript" @@ -67,3 +67,17 @@ state={ "selection": false, "syntax_highlighter": "Plain Text" } + +[res://Scripts/PlayArea.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 21, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 15, +"scroll_position": 0.0, +"selection": false, +"syntax_highlighter": "GDScript" +} diff --git a/Scenes/Cupcakes/cupcake.tscn b/Scenes/Cupcakes/cupcake.tscn index 8b34422..d5b6456 100644 --- a/Scenes/Cupcakes/cupcake.tscn +++ b/Scenes/Cupcakes/cupcake.tscn @@ -8,6 +8,7 @@ radius = 16.0 [node name="Cupcake" type="RigidBody2D"] collision_layer = 2 +inertia = 0.17 gravity_scale = 0.0 linear_damp = 6.0 script = ExtResource("1_2fcqt") diff --git a/Scenes/game_world.tscn b/Scenes/game_world.tscn index 46bbccf..d823dcd 100644 --- a/Scenes/game_world.tscn +++ b/Scenes/game_world.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=5 format=3 uid="uid://dlypem0porccr"] +[gd_scene load_steps=6 format=3 uid="uid://dlypem0porccr"] [ext_resource type="Script" path="res://Scripts/game_world.gd" id="1_c2sx0"] [ext_resource type="Script" path="res://Scripts/Cupcake Spawn Timer.gd" id="2_bjylp"] [ext_resource type="PackedScene" uid="uid://dswkgkor3yejo" path="res://Scenes/Cupcakes/cupcake.tscn" id="2_fi3r2"] +[ext_resource type="Script" path="res://Scripts/PlayArea.gd" id="3_3x1i6"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_sh03e"] size = Vector2(1943, 1102) @@ -18,16 +19,17 @@ autostart = true script = ExtResource("2_bjylp") [node name="PlayArea" type="Area2D" parent="."] -collision_layer = 3 -collision_mask = 3 +script = ExtResource("3_3x1i6") [node name="Cupcake" parent="PlayArea" instance=ExtResource("2_fi3r2")] +position = Vector2(83, -168) +collision_layer = 1 [node name="CollisionShape2D" type="CollisionShape2D" parent="PlayArea"] position = Vector2(961.5, 541) shape = SubResource("RectangleShape2D_sh03e") -disabled = true [connection signal="timeout" from="Cupcake Spawn Timer" to="." method="_on_timeout"] [connection signal="area_exited" from="PlayArea" to="." method="_on_play_area_area_exited"] +[connection signal="area_exited" from="PlayArea" to="PlayArea" method="_on_area_exited"] [connection signal="body_exited" from="PlayArea" to="." method="_on_play_area_body_exited"] diff --git a/Scripts/PlayArea.gd b/Scripts/PlayArea.gd new file mode 100644 index 0000000..6ea836c --- /dev/null +++ b/Scripts/PlayArea.gd @@ -0,0 +1,18 @@ +extends Area2D + +var horse = preload("res://Scripts/horse.gd") +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass + + +func _on_area_exited(body): + if body.is_in_group("Cupcake"): + horse.ccVanNum += 1 + print(horse.ccVanNum) + body.queue_free() diff --git a/Scripts/game_world.gd b/Scripts/game_world.gd index 542d2df..764464a 100644 --- a/Scripts/game_world.gd +++ b/Scripts/game_world.gd @@ -12,9 +12,9 @@ var ccChocolate var ccchoc var randX var randY -var ccSpawnRate = 10 +var ccSpawnRate = 25 var ccCount = 0 -var ccMaxOnScreen = 250 +var ccMaxOnScreen = 2000 func _ready(): horse_instance = horse_scene.instantiate() @@ -35,7 +35,7 @@ func spawnCupcakes(): randY = randi_range(10, 1070) ccvan.position = Vector2(randX, randY) $PlayArea.add_child(ccvan.duplicate()) - ccCount = ccCount + 1 + ccCount = ccCount + 25 @@ -43,27 +43,11 @@ func collectCupcakes(): pass - func _on_timeout(): var timer = get_node("Cupcake Spawn Timer") spawnCupcakes() timer.start - - - -func _on_play_area_area_exited(area): - pass - - - - func _on_play_area_body_exited(body): - if body.is_in_group("Cupcake"): - horse.ccVanNum += 1 - print(horse.ccVanNum) - body.queue_free() - + pass -func _on_play_area_area_shape_exited(area_rid, area, area_shape_index, local_shape_index): - pass # Replace with function body. diff --git a/Scripts/horse.gd b/Scripts/horse.gd index d08778a..c7bcf24 100644 --- a/Scripts/horse.gd +++ b/Scripts/horse.gd @@ -2,6 +2,7 @@ extends CharacterBody2D var horse_instance var mouse_position = Vector2.ZERO +var blower #ccScore var ccVanNum = 0 diff --git a/Scripts/varConst.gd b/Scripts/varConst.gd new file mode 100644 index 0000000..e08925d --- /dev/null +++ b/Scripts/varConst.gd @@ -0,0 +1,11 @@ +extends Node + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass diff --git a/Scripts/varVar.gd b/Scripts/varVar.gd new file mode 100644 index 0000000..e08925d --- /dev/null +++ b/Scripts/varVar.gd @@ -0,0 +1,11 @@ +extends Node + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass