Browse Source

bunch of fixes based on feedback, adding changelog

galo 1 year ago
parent
commit
7185118582
6 changed files with 16 additions and 31 deletions
  1. 6 2
      PowerUpControl.gd
  2. 6 4
      bacteria.gd
  3. 2 2
      main.tscn
  4. 2 0
      ui/Area2D2.gd
  5. 0 18
      ui/Button.tscn
  6. 0 5
      ui/TouchScreenButton.gd

+ 6 - 2
PowerUpControl.gd

@@ -1,10 +1,11 @@
 extends CanvasLayer
 
 func openmenu():
-#	get_tree().paused = true
+	buff1 = -1
+	buff2 = -1
+	$Control2/VSeparator/Button.text = "accept!"
 	Engine.time_scale = 0.01
 	$Control2.show()
-#	$AnimationPlayer.play("open")
 	$Control/VSeparator/Label.text = 'Choose a power:'
 	$Control/VSeparator/ItemList.clear()
 	var array = []
@@ -109,6 +110,9 @@ var lock = []
 #	print(lock)
 
 func _on_Button_button_down():
+	if buff1 == -1 or buff2 == -1:
+		$Control2/VSeparator/Button.text = "select a power before proceding"
+		return
 	_on_ItemList_item_activated(buff1)
 	_on_ItemList_item_activated(buff2)
 	pass # Replace with function body.

+ 6 - 4
bacteria.gd

@@ -79,10 +79,12 @@ func _on_hitbox_gotxp(arg):
 		nextxp += 5
 		lv += 1
 		print(lv)
-	$CanvasLayer/VBoxContainer/Label.set_text(str(int(currentxp)))
-	$CanvasLayer/VBoxContainer/Label3.set_text('Lv.'+str(lv))
-	$CanvasLayer/ProgressBar2.set_value( currentxp )
-	$CanvasLayer/ProgressBar2.set_max( nextxp )
+		$CanvasLayer/VBoxContainer/Label.set_text(str(int(currentxp)))
+		$CanvasLayer/VBoxContainer/Label3.set_text('Lv.'+str(lv))
+		$CanvasLayer/ProgressBar2.set_value( currentxp )
+		$CanvasLayer/ProgressBar2.set_max( nextxp )
+		yield(get_parent().get_node("PowerUpControl"),"close_menu")
+		yield(Timergen.createtime(self,0.01677),'timeout')
 	pass # Replace with function body.
 
 

+ 2 - 2
main.tscn

@@ -424,7 +424,7 @@ theme = SubResource( 2 )
 alignment = 1
 
 [node name="Label" type="Label" parent="PowerUpControl/Control/VSeparator"]
-margin_top = 408.0
+margin_top = 409.0
 margin_right = 300.0
 margin_bottom = 427.0
 custom_fonts/font = ExtResource( 7 )
@@ -693,7 +693,7 @@ position = Vector2( 434, 819 )
 rotation = -0.561978
 z_index = 20
 frames = SubResource( 17 )
-frame = 1
+frame = 8
 playing = true
 
 [node name="Play" type="TouchScreenButton" parent="PauseMenu/play"]

+ 2 - 0
ui/Area2D2.gd

@@ -27,6 +27,8 @@ func _on_Area2D2_area_entered(area):
 func _on_Area2D2_area_exited(area):
 	modulate = Color(1.0,1.0,1.0)
 	area.get_parent().posswitch = true
+	get_node('../../../..').buff1 = -1
+	get_node('../../../..').buff2 = -1
 	area.get_parent().initpos2 = global_position
 	get_node('../../../..').lock.erase(self)
 	pass # Replace with function body.

+ 0 - 18
ui/Button.tscn

@@ -81,12 +81,6 @@ scale = Vector2( 0.8, 0.8 )
 position = Vector2( 27.5, 21.5 )
 frames = SubResource( 2 )
 
-[node name="starsback" type="AnimatedSprite" parent="Label/icons/icon1"]
-visible = false
-position = Vector2( 51, 0 )
-frames = SubResource( 2 )
-animation = "starbase"
-
 [node name="stars" type="AnimatedSprite" parent="Label/icons/icon1"]
 position = Vector2( 51, 0 )
 frames = SubResource( 2 )
@@ -97,12 +91,6 @@ position = Vector2( 134.5, 21.5 )
 frames = SubResource( 2 )
 frame = 1
 
-[node name="starsback" type="AnimatedSprite" parent="Label/icons/icon2"]
-visible = false
-position = Vector2( 51, 0 )
-frames = SubResource( 2 )
-animation = "starbase"
-
 [node name="stars" type="AnimatedSprite" parent="Label/icons/icon2"]
 position = Vector2( 51, 0 )
 frames = SubResource( 2 )
@@ -113,12 +101,6 @@ position = Vector2( 238, 21.5 )
 frames = SubResource( 2 )
 frame = 2
 
-[node name="starsback" type="AnimatedSprite" parent="Label/icons/icon3"]
-visible = false
-position = Vector2( 51, 0 )
-frames = SubResource( 2 )
-animation = "starbase"
-
 [node name="stars" type="AnimatedSprite" parent="Label/icons/icon3"]
 position = Vector2( 51, 0 )
 frames = SubResource( 2 )

+ 0 - 5
ui/TouchScreenButton.gd

@@ -28,22 +28,17 @@ func _physics_process(delta):
 	$Label.text = text
 	$Label.show()
 	global_position = initpos if posswitch else initpos2
-#	if posswitch: global_position = initpos2
 	if not posswitch: $Label.hide()
-#	$col/CollisionShape2D.call_deferred('set_disabled', false)
 	if is_pressed(): 
-#		$col/CollisionShape2D.call_deferred('set_disabled', true)
 		$Label.hide()
 		global_position = get_global_mouse_position() - Vector2(32,32)
 
 
 func _on_Button_mouse_entered():
 	print('mouse in')
-#	$Label.show()
 	pass # Replace with function body.
 
 
 func _on_Button_mouse_exited():
 	print('mouse out')
-#	$Label.hide()
 	pass # Replace with function body.