From dfe7ed8ad69bf9d89d32dd696a47b16ebaca8781 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 1 Nov 2020 21:47:48 -0600 Subject: [PATCH] First working mobile prototype There's still a little lag, but it's going good. --- .gitignore | 1 + Scripts/Rocket.gd | 21 +++++++++++---------- export_presets.cfg | 8 ++++---- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 8b3ce48..accf7bb 100644 --- a/.gitignore +++ b/.gitignore @@ -357,3 +357,4 @@ Builds/ # Don't include deleted files import folder .import/ +.iOS/ diff --git a/Scripts/Rocket.gd b/Scripts/Rocket.gd index 4ac7331..efa6eba 100644 --- a/Scripts/Rocket.gd +++ b/Scripts/Rocket.gd @@ -19,15 +19,16 @@ func _process(delta): get_node("Collider").queue_free() yield(get_tree().create_timer(1.5), "timeout") queue_free() - get_tree().reload_current_scene() - if (InputEventScreenTouch.position <= get_viewport_rect().size.x/2): - if angle > -1.5: - rotate(-0.05) - angle -= 0.05 - elif (InputEventScreenTouch.position > get_viewport_rect().size.x/2): - if angle < 1.5: - rotate(0.05) - angle += 0.05 - else: + get_tree().reload_current_scene() + if Input.is_mouse_button_pressed(BUTTON_LEFT): + if (get_viewport().get_mouse_position().x <= get_viewport_rect().size.x/2): + if angle > -1.5: + rotate(-0.05) + angle -= 0.05 + elif (get_viewport().get_mouse_position().x > get_viewport_rect().size.x/2): + if angle < 1.5: + rotate(0.05) + angle += 0.05 + else: rotate(-angle/25) angle -= angle/25 diff --git a/export_presets.cfg b/export_presets.cfg index fd6e1f4..0940834 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/index.ipa" +export_path="iOS/spacescape2d.ipa" patch_list=PoolStringArray( ) script_export_mode=1 script_encryption_key="" @@ -172,9 +172,9 @@ privacy/camera_usage_description="" privacy/microphone_usage_description="" privacy/photolibrary_usage_description="" orientation/portrait=true -orientation/landscape_left=true -orientation/landscape_right=true -orientation/portrait_upside_down=true +orientation/landscape_left=false +orientation/landscape_right=false +orientation/portrait_upside_down=false required_icons/iphone_120x120="res://Images and Anims/Other/icon120.png" required_icons/ipad_76x76="res://Images and Anims/Other/icon76.png" required_icons/app_store_1024x1024="res://Images and Anims/Other/icon1024.png"