From 2ecf13538c2007625034bc56539c20093631b499 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Fri, 29 Jan 2021 11:31:48 -0600 Subject: [PATCH] Fix pause freezes game bug If you paused the game right after hitting an asteroid, it would stay frozen in the menu since there was no unpause button. This was fixed by removing the pause button on collision. --- Game Scenes/Game.tscn | 2 +- Game Scenes/MainMenu.tscn | 136 -------------------------------------- Scripts/Rocket.gd | 1 + export_presets.cfg | 4 +- 4 files changed, 4 insertions(+), 139 deletions(-) delete mode 100644 Game Scenes/MainMenu.tscn diff --git a/Game Scenes/Game.tscn b/Game Scenes/Game.tscn index 3293dbc..3289cac 100644 --- a/Game Scenes/Game.tscn +++ b/Game Scenes/Game.tscn @@ -83,7 +83,7 @@ __meta__ = { position = Vector2( -8.0022, -34.2137 ) scale = Vector2( 0.401688, 0.401688 ) frames = SubResource( 6 ) -frame = 1 +frame = 4 playing = true [node name="Theme Music" type="AudioStreamPlayer" parent="Rocket"] diff --git a/Game Scenes/MainMenu.tscn b/Game Scenes/MainMenu.tscn deleted file mode 100644 index 8281e9f..0000000 --- a/Game Scenes/MainMenu.tscn +++ /dev/null @@ -1,136 +0,0 @@ -[gd_scene load_steps=16 format=2] - -[ext_resource path="res://Scripts/Text Container.gd" type="Script" id=1] -[ext_resource path="res://Objects/Rocket.tscn" type="PackedScene" id=2] -[ext_resource path="res://Images and Anims/In Game/background.png" type="Texture" id=3] -[ext_resource path="res://Fonts/FasterOne-Regular.ttf" type="DynamicFontData" id=4] -[ext_resource path="res://Fonts/TurretRoad-Light.ttf" type="DynamicFontData" id=5] -[ext_resource path="res://Music and Sounds/menu.ogg" type="AudioStream" id=6] -[ext_resource path="res://Images and Anims/In Game/coin.png" type="Texture" id=7] - -[sub_resource type="DynamicFont" id=1] -size = 125 -outline_size = 9 -outline_color = Color( 0, 0, 0, 1 ) -use_filter = true -font_data = ExtResource( 4 ) - -[sub_resource type="DynamicFont" id=2] -size = 100 -font_data = ExtResource( 5 ) - -[sub_resource type="AtlasTexture" id=3] -flags = 4 -atlas = ExtResource( 7 ) -region = Rect2( 0, 0, 16, 16 ) - -[sub_resource type="AtlasTexture" id=4] -flags = 4 -atlas = ExtResource( 7 ) -region = Rect2( 16, 0, 16, 16 ) - -[sub_resource type="AtlasTexture" id=5] -flags = 4 -atlas = ExtResource( 7 ) -region = Rect2( 32, 0, 16, 16 ) - -[sub_resource type="AtlasTexture" id=6] -flags = 4 -atlas = ExtResource( 7 ) -region = Rect2( 48, 0, 16, 16 ) - -[sub_resource type="AtlasTexture" id=7] -flags = 4 -atlas = ExtResource( 7 ) -region = Rect2( 64, 0, 16, 16 ) - -[sub_resource type="SpriteFrames" id=8] -animations = [ { -"frames": [ SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ) ], -"loop": true, -"name": "default", -"speed": 8.0 -} ] - -[node name="MarginContainer" type="MarginContainer"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 80.0 -margin_top = 120.0 -margin_right = -80.0 -margin_bottom = -120.0 -custom_constants/margin_right = 120 -custom_constants/margin_top = 80 -custom_constants/margin_left = 120 -custom_constants/margin_bottom = 80 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="HBoxContainer" type="HBoxContainer" parent="."] -margin_left = 120.0 -margin_top = 80.0 -margin_right = 548.0 -margin_bottom = 1472.0 - -[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"] -margin_bottom = 1392.0 - -[node name="Rocket" parent="HBoxContainer/VBoxContainer" instance=ExtResource( 2 )] -position = Vector2( 203.049, 610.744 ) -scale = Vector2( 10, 10 ) - -[node name="Menu Music" type="AudioStreamPlayer" parent="HBoxContainer/VBoxContainer/Rocket"] -stream = ExtResource( 6 ) -autoplay = true - -[node name="Text Container" type="Node2D" parent="HBoxContainer/VBoxContainer"] -position = Vector2( 204.073, 604.439 ) -scale = Vector2( 0.7, 0.7 ) -script = ExtResource( 1 ) - -[node name="AsteroidDodge" type="Label" parent="HBoxContainer/VBoxContainer/Text Container"] -margin_left = -498.941 -margin_top = -785.719 -margin_right = 496.059 -margin_bottom = -448.719 -custom_fonts/font = SubResource( 1 ) -text = "AsterVoid -" -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Tap" type="Label" parent="HBoxContainer/VBoxContainer/Text Container"] -margin_left = -288.69 -margin_top = 979.438 -margin_right = 272.31 -margin_bottom = 1089.44 -custom_fonts/font = SubResource( 2 ) -text = "Tap to play!" -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="AnimatedSprite" type="AnimatedSprite" parent="HBoxContainer/VBoxContainer"] -position = Vector2( 95.1149, 1.36029 ) -scale = Vector2( 3.39608, 3.39608 ) -frames = SubResource( 8 ) -frame = 4 -playing = true - -[node name="CenterContainer" type="CenterContainer" parent="HBoxContainer"] -margin_left = 4.0 -margin_right = 4.0 -margin_bottom = 1392.0 - -[node name="Background" type="Sprite" parent="."] -visible = false -position = Vector2( 339.761, 738.579 ) -scale = Vector2( 4.19527, 4.19527 ) -z_index = -1 -texture = ExtResource( 3 ) diff --git a/Scripts/Rocket.gd b/Scripts/Rocket.gd index 0671f3f..2633880 100644 --- a/Scripts/Rocket.gd +++ b/Scripts/Rocket.gd @@ -20,6 +20,7 @@ func _process(delta): var score = -position.y/10 var collision = move_and_collide(Vector2(difficulty * sin(angle) * delta, -difficulty * cos(angle) * delta)) if collision: + get_parent().get_node("CanvasLayer/PauseButton").queue_free() $Explosion.play() lastscore = score if score > gameNode.hiscore: diff --git a/export_presets.cfg b/export_presets.cfg index b7fb65e..18b1c8c 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -137,7 +137,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="../iOS Builds/2.8/astervoid.ipa" +export_path="../iOS Builds/2.9/astervoid.ipa" patch_list=PoolStringArray( ) script_export_mode=1 script_encryption_key="" @@ -158,7 +158,7 @@ application/info="Made with Godot Engine" application/identifier="com.ADAwesomeGames.AsterVoid" application/signature="" application/short_version="2.0" -application/version="2.8" +application/version="2.9" application/copyright="2021 AD Awesome Games" capabilities/arkit=false capabilities/camera=false