BigDoor now splits gem and label in half when opening! (;

Player.joy rounding fix! (=
MenuMakeover Eye.svg remnant removed!
This commit is contained in:
Harmony Honey 2023-01-07 01:17:40 -05:00
parent 5120a367ec
commit 3d862bd675
13 changed files with 226 additions and 176 deletions

File diff suppressed because one or more lines are too long

View file

@ -6,6 +6,7 @@
size = 70
outline_size = 5
outline_color = Color( 0, 0, 0, 1 )
use_mipmaps = true
use_filter = true
extra_spacing_bottom = -7
font_data = ExtResource( 1 )

View file

@ -21,7 +21,7 @@ compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/mipmaps=true
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true

View file

@ -4,9 +4,11 @@
[node name="Clock" type="Polygon2D"]
self_modulate = Color( 1, 0.984314, 0, 1 )
polygon = PoolVector2Array( 25, 0, 23.097, 9.56709, 17.6777, 17.6777, 9.56709, 23.097, -1.09278e-06, 25, -9.56709, 23.097, -17.6777, 17.6777, -23.097, 9.56709, -25, -2.18557e-06, -23.097, -9.56709, -17.6777, -17.6777, -9.56709, -23.097, 2.98122e-07, -25, 9.56709, -23.097, 17.6777, -17.6777, 23.097, -9.56709 )
antialiased = true
polygon = PoolVector2Array( 25, 0, 24.1481, 6.47048, 21.6506, 12.5, 17.6777, 17.6777, 12.5, 21.6506, 6.47048, 24.1481, -1.09278e-06, 25, -6.47048, 24.1481, -12.5, 21.6506, -17.6777, 17.6777, -21.6506, 12.5, -24.1481, 6.47048, -25, -2.18557e-06, -24.1481, -6.47048, -21.6506, -12.5, -17.6777, -17.6777, -12.5, -21.6506, -6.47047, -24.1481, 2.98122e-07, -25, 6.47048, -24.1481, 12.5, -21.6506, 17.6777, -17.6777, 21.6506, -12.5, 24.1481, -6.47047 )
script = ExtResource( 1 )
radius = 25.0
points = 24
[node name="Fill" type="Polygon2D" parent="."]
modulate = Color( 1, 0.866667, 0, 1 )

View file

@ -194,7 +194,8 @@ func _physics_process(delta):
if is_input and !Cutscene.is_playing and !Wipe.is_wipe:
joy_last = joy
joy = Input.get_vector("left", "right", "up", "down").round()
joy = Input.get_vector("left", "right", "up", "down")
joy = Vector2(sign(joy.x), sign(joy.y))
btnp_jump = Input.is_action_just_pressed("jump")
btnp_push = Input.is_action_just_pressed("grab")
@ -325,25 +326,7 @@ func _physics_process(delta):
# release box
if is_release:
is_hold = false
is_release = false
is_move = true
has_jumped = true
hold_clock = 0.0
remove_collision_exception_with(box)
box.remove_collision_exception_with(self)
box.is_hold = false
box.pickup()
Guide.set_box(null)
release_anim()
audio_grab.pitch_scale = rand_range(0.7, 1.3)
audio_grab.play()
release_clock = release_time
box_release()
# not holding
else:
@ -664,13 +647,34 @@ func die():
velocity = Vector2(-350 * dir_x, -800)
if is_hold:
release_anim()
Guide.set_box(null)
box_release()
anim.play("jump")
audio_spike.play()
audio_fallout.play()
func box_release():
is_hold = false
is_release = false
is_move = true
has_jumped = true
hold_clock = 0.0
spr_root.rotation = 0
remove_collision_exception_with(box)
box.remove_collision_exception_with(self)
box.is_hold = false
box.pickup()
Guide.set_box(null)
release_anim()
audio_grab.pitch_scale = rand_range(0.7, 1.3)
audio_grab.play()
release_clock = release_time
func release_anim():
# set animation keys
var rel = anim.get_animation("release")

View file

@ -1,10 +1,10 @@
tool
extends Door
onready var gem := $Sprites/Gem
onready var label := $Sprites/Gem/Label
onready var doors := [$Sprites/Left, $Sprites/Right]
onready var gems := [$Sprites/Left/Gem, $Sprites/Right/Gem]
onready var labels := [$Sprites/Left/Control/Label, $Sprites/Right/Control/Label]
onready var door_mat : ShaderMaterial = $Sprites/Door.material
onready var knobs = [$Sprites/Knob, $Sprites/Knob2]
export var gem_count := 0 setget set_gem
@ -21,18 +21,22 @@ func _physics_process(delta):
if open_close:
var s = open_easy.count(delta, open_close > 0)
door_mat.set_shader_param("line", lerp(0.0, 1.0, s))
gem.modulate.a = 1.0 - s
for i in knobs:
for i in doors:
i.scale.x = lerp(1.0, 0.0, s)
if open_easy.clock == 0 or open_easy.is_complete:
open_close = 0
func set_gem(arg := gem_count):
gem_count = max(arg, 0)
if label:
label.text = str(gem_count)
if gem:
gem.visible = gem_count > 0
var v = gem_count > 0
if labels:
for i in labels:
i.text = str(gem_count)
i.visible = v
if gems:
for i in gems:
i.visible = v
# unlock cheat
func cheat_code(cheat):

View file

@ -45,42 +45,76 @@ script = ExtResource( 5 )
size = Vector2( 100, 100 )
radius = Plane( 0, 0, 50, 50 )
[node name="Knob" type="Polygon2D" parent="Sprites" index="1"]
modulate = Color( 1, 1, 0, 1 )
position = Vector2( -100, 65 )
polygon = PoolVector2Array( 82.5, 0, 81.4952, 3.75, 78.75, 6.49519, 75, 7.5, 71.25, 6.49519, 68.5048, 3.75, 67.5, -6.55671e-07, 68.5048, -3.75, 71.25, -6.49519, 75, -7.5, 78.75, -6.49519, 81.4952, -3.75 )
script = ExtResource( 6 )
radius = 7.5
circle_offset = Vector2( 75, 0 )
points = 12
[node name="Left" type="Node2D" parent="Sprites" index="1"]
position = Vector2( -100, 0 )
[node name="Knob2" type="Polygon2D" parent="Sprites" index="2"]
modulate = Color( 1, 1, 0, 1 )
position = Vector2( 100, 65 )
polygon = PoolVector2Array( -67.5, 0, -68.5048, 3.75, -71.25, 6.49519, -75, 7.5, -78.75, 6.49519, -81.4952, 3.75, -82.5, -6.55671e-07, -81.4952, -3.75, -78.75, -6.49519, -75, -7.5, -71.25, -6.49519, -68.5048, -3.75 )
script = ExtResource( 6 )
radius = 7.5
circle_offset = Vector2( -75, 0 )
points = 12
[node name="Gem" type="Node2D" parent="Sprites" index="3"]
visible = false
position = Vector2( 0, -10 )
[node name="Gem" parent="Sprites/Gem" index="0" instance=ExtResource( 3 )]
[node name="Gem" parent="Sprites/Left" index="0" instance=ExtResource( 3 )]
position = Vector2( 100, -10 )
scale = Vector2( 2.5, 2.5 )
polygon = PoolVector2Array( -30, 0, 0, -30, 0, 30 )
[node name="Label" type="Label" parent="Sprites/Gem" index="1"]
margin_left = -75.0
margin_top = -75.0
margin_right = 75.0
margin_bottom = 75.0
[node name="Fill" parent="Sprites/Left/Gem" index="0"]
polygon = PoolVector2Array( -20, 0, 0, -20, 0, 20 )
[node name="Knob" type="Polygon2D" parent="Sprites/Left" index="1"]
modulate = Color( 1, 1, 0, 1 )
position = Vector2( 75, 65 )
polygon = PoolVector2Array( 7.5, 0, 6.49519, 3.75, 3.75, 6.49519, -3.27835e-07, 7.5, -3.75, 6.49519, -6.49519, 3.75, -7.5, -6.55671e-07, -6.49519, -3.75, -3.75, -6.49519, 8.94366e-08, -7.5, 3.75, -6.49519, 6.49519, -3.75 )
script = ExtResource( 6 )
radius = 7.5
points = 12
[node name="Control" type="Control" parent="Sprites/Left" index="2"]
margin_top = -100.0
margin_right = 100.0
margin_bottom = 100.0
rect_clip_content = true
[node name="Label" type="Label" parent="Sprites/Left/Control" index="0"]
margin_left = 25.0
margin_top = 15.0
margin_right = 175.0
margin_bottom = 165.0
custom_fonts/font = ExtResource( 2 )
text = "0"
align = 1
valign = 1
[node name="Right" type="Node2D" parent="Sprites" index="2"]
position = Vector2( 100, 0 )
[node name="Gem" parent="Sprites/Right" index="0" instance=ExtResource( 3 )]
position = Vector2( -100, -10 )
scale = Vector2( 2.5, 2.5 )
polygon = PoolVector2Array( 0, -30, 30, 0, 0, 30 )
[node name="Fill" parent="Sprites/Right/Gem" index="0"]
polygon = PoolVector2Array( 0, -20, 20, 0, 0, 20 )
[node name="Knob" type="Polygon2D" parent="Sprites/Right" index="1"]
modulate = Color( 1, 1, 0, 1 )
position = Vector2( -75, 65 )
polygon = PoolVector2Array( 7.5, 0, 6.49519, 3.75, 3.75, 6.49519, -3.27835e-07, 7.5, -3.75, 6.49519, -6.49519, 3.75, -7.5, -6.55671e-07, -6.49519, -3.75, -3.75, -6.49519, 8.94366e-08, -7.5, 3.75, -6.49519, 6.49519, -3.75 )
script = ExtResource( 6 )
radius = 7.5
points = 12
[node name="Control" type="Control" parent="Sprites/Right" index="2"]
margin_left = -100.0
margin_top = -100.0
margin_bottom = 100.0
rect_clip_content = true
[node name="Label" type="Label" parent="Sprites/Right/Control" index="0"]
margin_left = -75.0
margin_top = 15.0
margin_right = 75.0
margin_bottom = 165.0
custom_fonts/font = ExtResource( 2 )
text = "0"
align = 1
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[editable path="Arrow"]
[editable path="Sprites/Left/Gem"]
[editable path="Sprites/Right/Gem"]

View file

@ -58,7 +58,7 @@ func _physics_process(delta):
func activate():
if not "hub" in scene_path and scene_path.begins_with(Shared.worlds_path):
UI.clock_ease.show = arrow.is_active
UI.clock_ease.show = arrow.is_active and Shared.clock_show > 0
var m = scene_path.lstrip(Shared.worlds_path).rstrip(".tscn")
UI.clock_best.visible = Shared.goals.has(m)
if UI.clock_best.visible:

View file

@ -57,6 +57,5 @@ color = Color( 1, 0, 0.913725, 1 )
[node name="Clock" parent="Sprites/Open" index="2" instance=ExtResource( 4 )]
visible = false
position = Vector2( 40, -5 )
polygon = PoolVector2Array( 50, 0, 46.194, 19.1342, 35.3553, 35.3553, 19.1342, 46.194, -2.18557e-06, 50, -19.1342, 46.194, -35.3553, 35.3553, -46.194, 19.1342, -50, -4.37114e-06, -46.194, -19.1342, -35.3553, -35.3553, -19.1342, -46.194, 5.96244e-07, -50, 19.1342, -46.194, 35.3553, -35.3553, 46.194, -19.1342 )
[editable path="Sprites/Open/Gem"]

View file

@ -135,7 +135,6 @@ size_flags_vertical = 4
[node name="Clock" parent="Control/Down/Image" instance=ExtResource( 5 )]
position = Vector2( 30, 30 )
polygon = PoolVector2Array( 25, 0, 23.097, 9.56709, 17.6777, 17.6777, 9.56709, 23.097, -1.09278e-06, 25, -9.56709, 23.097, -17.6777, 17.6777, -23.097, 9.56709, -25, -2.18557e-06, -23.097, -9.56709, -17.6777, -17.6777, -9.56709, -23.097, 2.98122e-07, -25, 9.56709, -23.097, 17.6777, -17.6777, 23.097, -9.56709 )
[node name="Caption" type="Label" parent="Control"]
anchor_right = 1.0

View file

@ -32,7 +32,6 @@ modulate = Color( 1, 0, 0, 1 )
rotation = 0.785397
polygon = PoolVector2Array( 8.5, -8.5, 17, -8.5, 21.9962, -6.87664, 25.084, -2.62664, 25.084, 2.62664, 21.9962, 6.87664, 17, 8.5, 8.5, 8.5, 8.5, 17, 6.87664, 21.9962, 2.62664, 25.084, -2.62665, 25.084, -6.87665, 21.9962, -8.5, 17, -8.5, 8.5, -17, 8.5, -21.9962, 6.87664, -25.084, 2.62664, -25.084, -2.62665, -21.9962, -6.87665, -17, -8.5, -8.5, -8.5, -8.5, -17, -6.87664, -21.9962, -2.62665, -25.084, 2.62665, -25.084, 6.87664, -21.9962, 8.5, -17 )
script = ExtResource( 2 )
poly_path = NodePath(".")
[node name="Area2D" type="Area2D" parent="."]
visible = false

View file

@ -95,7 +95,6 @@ __meta__ = {
[node name="Clock" parent="Items/Goals/Clocks/Image" instance=ExtResource( 1 )]
position = Vector2( 30, 30 )
polygon = PoolVector2Array( 25, 0, 23.097, 9.56709, 17.6777, 17.6777, 9.56709, 23.097, -1.09278e-06, 25, -9.56709, 23.097, -17.6777, 17.6777, -23.097, 9.56709, -25, -2.18557e-06, -23.097, -9.56709, -17.6777, -17.6777, -9.56709, -23.097, 2.98122e-07, -25, 9.56709, -23.097, 17.6777, -17.6777, 23.097, -9.56709 )
[node name="Label" type="Label" parent="Items/Goals/Clocks"]
margin_left = 69.0

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=2]
[gd_scene load_steps=12 format=2]
[ext_resource path="res://src/menu/MenuMakeover.gd" type="Script" id=2]
[ext_resource path="res://src/menu/options/scroll/Hairstyle.tscn" type="PackedScene" id=3]
@ -7,7 +7,6 @@
[ext_resource path="res://src/actor/shape/Circle.gd" type="Script" id=6]
[ext_resource path="res://media/image/UI/reset.svg" type="Texture" id=7]
[ext_resource path="res://src/menu/options/scroll/Color.gd" type="Script" id=8]
[ext_resource path="res://media/image/UI/eye.svg" type="Texture" id=9]
[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 1, 1, 1, 1 )
@ -26,8 +25,9 @@ corner_radius_bottom_left = 50
[sub_resource type="StyleBoxFlat" id=6]
bg_color = Color( 1, 1, 1, 1 )
[sub_resource type="Curve" id=5]
_data = [ Vector2( 0, 0.418182 ), 0.0, 0.581818, 0, 1, Vector2( 1, 1 ), 0.581818, 0.0, 1, 0 ]
[sub_resource type="Curve" id=7]
min_value = 0.73
_data = [ Vector2( 0, 0.73 ), 0.0, 0.27, 0, 1, Vector2( 1, 1 ), 0.27, 0.0, 1, 0 ]
[node name="MenuMakeover" type="CanvasLayer"]
pause_mode = 2
@ -319,14 +319,6 @@ margin_right = 245.0
margin_bottom = 70.0
rect_min_size = Vector2( 70, 70 )
[node name="TextureRect" type="TextureRect" parent="Dialog/List/Eye/HBoxContainer/Circle3"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
texture = ExtResource( 9 )
expand = true
stretch_mode = 5
[node name="Eyes" type="Node2D" parent="Dialog/List/Eye/HBoxContainer/Circle3"]
position = Vector2( 35, 35 )
scale = Vector2( 2, 2 )
@ -502,10 +494,12 @@ scale = Vector2( 1.333, 1.333 )
[node name="LegL" type="Line2D" parent="Dialog/List/Fit/HBoxContainer/Circle/Fit"]
position = Vector2( -5, -9.5 )
rotation = 0.387463
points = PoolVector2Array( 0, 0, 0, 26 )
points = PoolVector2Array( 0, 0, -7.62939e-06, 26 )
default_color = Color( 1, 1, 1, 1 )
begin_cap_mode = 2
end_cap_mode = 2
round_precision = 6
antialiased = true
[node name="LegR" type="Line2D" parent="Dialog/List/Fit/HBoxContainer/Circle/Fit"]
position = Vector2( 5, -9.5 )
@ -514,12 +508,14 @@ points = PoolVector2Array( 0, 0, 0, 26 )
default_color = Color( 1, 1, 1, 1 )
begin_cap_mode = 2
end_cap_mode = 2
round_precision = 6
antialiased = true
[node name="Torso" type="Line2D" parent="Dialog/List/Fit/HBoxContainer/Circle/Fit"]
position = Vector2( 0, -9.5 )
points = PoolVector2Array( 0, -5, 0, 20 )
width = 25.0
width_curve = SubResource( 5 )
width = 15.5
width_curve = SubResource( 7 )
default_color = Color( 1, 1, 1, 1 )
[node name="Circle2" type="Control" parent="Dialog/List/Fit/HBoxContainer"]
@ -539,10 +535,12 @@ scale = Vector2( 1.444, 1.444 )
[node name="LegL" type="Line2D" parent="Dialog/List/Fit/HBoxContainer/Circle2/Fit"]
position = Vector2( -5, -9.5 )
rotation = 0.387463
points = PoolVector2Array( 0, 0, 0, 26 )
points = PoolVector2Array( 0, 0, -7.62939e-06, 26 )
default_color = Color( 1, 1, 1, 1 )
begin_cap_mode = 2
end_cap_mode = 2
round_precision = 6
antialiased = true
[node name="LegR" type="Line2D" parent="Dialog/List/Fit/HBoxContainer/Circle2/Fit"]
position = Vector2( 5, -9.5 )
@ -551,12 +549,14 @@ points = PoolVector2Array( 0, 0, 0, 26 )
default_color = Color( 1, 1, 1, 1 )
begin_cap_mode = 2
end_cap_mode = 2
round_precision = 6
antialiased = true
[node name="Torso" type="Line2D" parent="Dialog/List/Fit/HBoxContainer/Circle2/Fit"]
position = Vector2( 0, -9.5 )
points = PoolVector2Array( 0, -5, 0, 20 )
width = 25.0
width_curve = SubResource( 5 )
width = 15.5
width_curve = SubResource( 7 )
default_color = Color( 1, 1, 1, 1 )
[node name="Circle3" type="Control" parent="Dialog/List/Fit/HBoxContainer"]
@ -576,10 +576,12 @@ scale = Vector2( 1.667, 1.667 )
[node name="LegL" type="Line2D" parent="Dialog/List/Fit/HBoxContainer/Circle3/Fit"]
position = Vector2( -5, -9.5 )
rotation = 0.387463
points = PoolVector2Array( 0, 0, 0, 26 )
points = PoolVector2Array( 0, 0, -7.62939e-06, 26 )
default_color = Color( 1, 1, 1, 1 )
begin_cap_mode = 2
end_cap_mode = 2
round_precision = 6
antialiased = true
[node name="LegR" type="Line2D" parent="Dialog/List/Fit/HBoxContainer/Circle3/Fit"]
position = Vector2( 5, -9.5 )
@ -588,12 +590,14 @@ points = PoolVector2Array( 0, 0, 0, 26 )
default_color = Color( 1, 1, 1, 1 )
begin_cap_mode = 2
end_cap_mode = 2
round_precision = 6
antialiased = true
[node name="Torso" type="Line2D" parent="Dialog/List/Fit/HBoxContainer/Circle3/Fit"]
position = Vector2( 0, -9.5 )
points = PoolVector2Array( 0, -5, 0, 20 )
width = 25.0
width_curve = SubResource( 5 )
width = 15.5
width_curve = SubResource( 7 )
default_color = Color( 1, 1, 1, 1 )
[node name="Circle4" type="Control" parent="Dialog/List/Fit/HBoxContainer"]
@ -612,10 +616,12 @@ scale = Vector2( 1.444, 1.444 )
[node name="LegL" type="Line2D" parent="Dialog/List/Fit/HBoxContainer/Circle4/Fit"]
position = Vector2( -5, -9.5 )
rotation = 0.387463
points = PoolVector2Array( 0, 0, 0, 26 )
points = PoolVector2Array( 0, 0, -7.62939e-06, 26 )
default_color = Color( 1, 1, 1, 1 )
begin_cap_mode = 2
end_cap_mode = 2
round_precision = 6
antialiased = true
[node name="LegR" type="Line2D" parent="Dialog/List/Fit/HBoxContainer/Circle4/Fit"]
position = Vector2( 5, -9.5 )
@ -624,12 +630,14 @@ points = PoolVector2Array( 0, 0, 0, 26 )
default_color = Color( 1, 1, 1, 1 )
begin_cap_mode = 2
end_cap_mode = 2
round_precision = 6
antialiased = true
[node name="Torso" type="Line2D" parent="Dialog/List/Fit/HBoxContainer/Circle4/Fit"]
position = Vector2( 0, -9.5 )
points = PoolVector2Array( 0, -5, 0, 20 )
width = 25.0
width_curve = SubResource( 5 )
width = 15.5
width_curve = SubResource( 7 )
default_color = Color( 1, 1, 1, 1 )
[node name="Circle5" type="Control" parent="Dialog/List/Fit/HBoxContainer"]
@ -649,10 +657,12 @@ scale = Vector2( 1.333, 1.333 )
[node name="LegL" type="Line2D" parent="Dialog/List/Fit/HBoxContainer/Circle5/Fit"]
position = Vector2( -5, -9.5 )
rotation = 0.387463
points = PoolVector2Array( 0, 0, 0, 26 )
points = PoolVector2Array( 0, 0, -7.62939e-06, 26 )
default_color = Color( 1, 1, 1, 1 )
begin_cap_mode = 2
end_cap_mode = 2
round_precision = 6
antialiased = true
[node name="LegR" type="Line2D" parent="Dialog/List/Fit/HBoxContainer/Circle5/Fit"]
position = Vector2( 5, -9.5 )
@ -661,12 +671,14 @@ points = PoolVector2Array( 0, 0, 0, 26 )
default_color = Color( 1, 1, 1, 1 )
begin_cap_mode = 2
end_cap_mode = 2
round_precision = 6
antialiased = true
[node name="Torso" type="Line2D" parent="Dialog/List/Fit/HBoxContainer/Circle5/Fit"]
position = Vector2( 0, -9.5 )
points = PoolVector2Array( 0, -5, 0, 20 )
width = 25.0
width_curve = SubResource( 5 )
width = 15.5
width_curve = SubResource( 7 )
default_color = Color( 1, 1, 1, 1 )
[node name="Random" type="TextureRect" parent="Dialog/List"]