Browse Source

increased speed 32x, added functionality of seeing current speed

galo 2 years ago
parent
commit
f54e35d883

+ 3 - 0
.import/dowloadbackground1.jpg-30e3eafb40a0933afbd6f84e744cf0a4.md5

@@ -0,0 +1,3 @@
+source_md5="b619ae44f60da4b2fc006e8a1f858b9b"
+dest_md5="2658f0e4659110e97bfa2f96035545f4"
+

BIN
.import/dowloadbackground1.jpg-30e3eafb40a0933afbd6f84e744cf0a4.stex


+ 0 - 6
Button.gd

@@ -1,13 +1,7 @@
 extends Button
 
-
-
 func _on_Button_button_down():
 	var PATH = OS.get_executable_path().get_base_dir().plus_file('run.bat')
-	print(PATH)
 	OS.execute(PATH, [], false)
-	
-#	OS.execute("F:/Users/Galo/Documents/GitHub/Game Export/launcher/run.bat", [], false)
-
 	yield(get_tree().create_timer(1.0), "timeout")
 	get_tree().quit()

BIN
dowloadbackground1.jpg


+ 34 - 0
dowloadbackground1.jpg.import

@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/dowloadbackground1.jpg-30e3eafb40a0933afbd6f84e744cf0a4.stex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://dowloadbackground1.jpg"
+dest_files=[ "res://.import/dowloadbackground1.jpg-30e3eafb40a0933afbd6f84e744cf0a4.stex" ]
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/bptc_ldr=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+process/invert_color=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0

+ 3 - 11
launcher.gd

@@ -6,8 +6,8 @@ var downloaded_bytes = 0
 var body_size = 0
 var dowload = true
 
-export var versionfile = 'https://git.galodev.net/galo/ghosthandupdate/raw/master/version.json'
-export var pckfile = 'https://download1645.mediafire.com/u9zz5bf2gvng/e8fuz27b4t5uvvq/GhostHand.pck'
+export var versionfile = 'https://git.galodev.net/galo/ghosthandupdate2/raw/master/version.json'
+export var pckfile = 'https://git.galodev.net/galo/ghosthandupdate2/raw/master/Ghost%20Hand.pck'
 
 func _ready():
 	if ResourceLoader.exists('user://patches/currentversion.tres'):
@@ -28,8 +28,6 @@ func _ready():
 	save_game.store_line('gamelauncher.exe --main-pack GhostHand.pck')
 	save_game.store_line('popd')
 	save_game.close()
-	
-	
 
 func dowloadupdate():
 	print('dowloading patch')
@@ -42,17 +40,12 @@ func _on_HTTPRequest_request_completed(result, response_code, headers, body):
 		$Label.text = 'your dowload just finished'
 		$Button.set_disabled(false)
 		$ProgressBar.value = 100
-#		ProjectSettings.load_resource_pack('user://patches/newpatch.pck')
-#		get_tree().change_scene_to(load("res://Login/Client.tscn"))
 	else:
 		server_connect_fail()
 
 func server_connect_fail():
 	$Label.text = 'server connection failure!'
 	print('failed to connect to server')
-#		if ResourceLoader.exists('user://patches/newpatch.pck'):
-#			ProjectSettings.load_resource_pack('user://patches/newpatch.pck')
-#		get_tree().change_scene_to(load("res://Login/Client.tscn"))
 
 func _on_HTTPRequest2_request_completed(result, response_code, headers, body):
 	if response_code == 200:
@@ -72,14 +65,13 @@ func _on_HTTPRequest2_request_completed(result, response_code, headers, body):
 			print('no version to dowload')
 			$Label.text = 'you are on the most recent version!!!'
 			$Button.set_disabled(false)
-#			ProjectSettings.load_resource_pack('user://patches/newpatch.pck')
-#			get_tree().change_scene_to(load("res://Client/Client.tscn"))
 	else:
 		server_connect_fail()
 		$Label.text = 'server connection failure!'
 	pass # Replace with function body.
 
 func force_update():
+	$Button.set_disabled(true)
 	dowloadupdate()
 	dowload = false
 

+ 52 - 10
launcher.tscn

@@ -1,4 +1,4 @@
-[gd_scene load_steps=8 format=2]
+[gd_scene load_steps=10 format=2]
 
 [ext_resource path="res://launcher.gd" type="Script" id=1]
 [ext_resource path="res://dowloadbackground.png" type="Texture" id=2]
@@ -6,8 +6,27 @@
 [ext_resource path="res://CheckBox.gd" type="Script" id=4]
 [ext_resource path="res://Helm.ogg" type="AudioStream" id=5]
 [ext_resource path="res://Button.gd" type="Script" id=6]
+[ext_resource path="res://dowloadbackground1.jpg" type="Texture" id=7]
 
-[sub_resource type="DynamicFont" id=1]
+[sub_resource type="Animation" id=1]
+resource_name = "New Anim"
+length = 24.0
+loop = true
+step = 1.0
+tracks/0/type = "value"
+tracks/0/path = NodePath("dowloadbackground:modulate")
+tracks/0/interp = 1
+tracks/0/loop_wrap = true
+tracks/0/imported = false
+tracks/0/enabled = true
+tracks/0/keys = {
+"times": PoolRealArray( 0, 10, 12, 22, 24 ),
+"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
+"update": 0,
+"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
+}
+
+[sub_resource type="DynamicFont" id=2]
 size = 12
 font_data = ExtResource( 3 )
 
@@ -19,15 +38,27 @@ download_chunk_size = 65536
 
 [node name="HTTPRequest2" type="HTTPRequest" parent="."]
 
-[node name="dowloadbackground" type="Sprite" parent="."]
-modulate = Color( 1, 1, 1, 0.352941 )
+[node name="background" type="Node2D" parent="."]
+
+[node name="dowloadbackground2" type="Sprite" parent="background"]
+z_index = -1
+texture = ExtResource( 7 )
+centered = false
+
+[node name="dowloadbackground" type="Sprite" parent="background"]
+z_index = -1
 texture = ExtResource( 2 )
 centered = false
 
-[node name="ColorRect" type="ColorRect" parent="dowloadbackground"]
+[node name="AnimationPlayer" type="AnimationPlayer" parent="background"]
+autoplay = "New Anim"
+"anims/New Anim" = SubResource( 1 )
+
+[node name="ColorRect" type="ColorRect" parent="."]
 use_parent_material = true
 anchor_right = 1.0
 anchor_bottom = 1.0
+color = Color( 1, 1, 1, 0.458824 )
 __meta__ = {
 "_edit_use_anchors_": false
 }
@@ -41,7 +72,7 @@ margin_left = -100.0
 margin_top = -24.6051
 margin_right = 100.0
 margin_bottom = -10.6051
-custom_fonts/font = SubResource( 1 )
+custom_fonts/font = SubResource( 2 )
 __meta__ = {
 "_edit_use_anchors_": false
 }
@@ -56,7 +87,7 @@ anchor_bottom = 0.5
 margin_top = -7.0
 margin_bottom = 46.0
 rect_pivot_offset = Vector2( 95.3067, 6.6933 )
-custom_fonts/font = SubResource( 1 )
+custom_fonts/font = SubResource( 2 )
 text = "Checking most recent version!"
 align = 1
 valign = 1
@@ -65,6 +96,17 @@ __meta__ = {
 "_edit_use_anchors_": false
 }
 
+[node name="ColorRect" type="ColorRect" parent="Label"]
+show_behind_parent = true
+anchor_right = 1.0
+anchor_bottom = 1.0
+margin_left = 15.0
+margin_right = -15.0
+color = Color( 0, 0, 0, 0.278431 )
+__meta__ = {
+"_edit_use_anchors_": false
+}
+
 [node name="Button" type="Button" parent="."]
 anchor_left = 0.5
 anchor_top = 0.5
@@ -74,7 +116,7 @@ margin_left = -30.0
 margin_top = 85.9482
 margin_right = 30.0
 margin_bottom = 105.948
-custom_fonts/font = SubResource( 1 )
+custom_fonts/font = SubResource( 2 )
 disabled = true
 text = "launch"
 script = ExtResource( 6 )
@@ -91,7 +133,7 @@ margin_left = -54.5
 margin_top = 123.945
 margin_right = 54.5
 margin_bottom = 143.946
-custom_fonts/font = SubResource( 1 )
+custom_fonts/font = SubResource( 2 )
 text = "force update"
 script = ExtResource( 6 )
 __meta__ = {
@@ -107,7 +149,7 @@ margin_left = -33.0
 margin_top = 52.5296
 margin_right = 33.0
 margin_bottom = 76.5296
-custom_fonts/font = SubResource( 1 )
+custom_fonts/font = SubResource( 2 )
 pressed = true
 text = "music"
 script = ExtResource( 4 )