mirror of
https://github.com/HarmonyHoney/tiny_crate.git
synced 2026-01-23 02:34:53 +00:00
expand_width WIP (:
Splash, Wipe, Pause & UI done! touch_screen todo (; Space for Jump Input, Alt & Control for pickup!
This commit is contained in:
parent
c346f465ef
commit
9b430abb39
9 changed files with 72 additions and 41 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -2,4 +2,5 @@
|
|||
.import/
|
||||
*.import
|
||||
[Ee]xport/
|
||||
[Bb]uild/
|
||||
[Bb]uild/
|
||||
[Aa]ndroid/
|
||||
|
|
@ -110,7 +110,7 @@ window/size/test_width=1280
|
|||
window/size/test_height=720
|
||||
window/dpi/allow_hidpi=true
|
||||
window/stretch/mode="viewport"
|
||||
window/stretch/aspect="keep"
|
||||
window/stretch/aspect="keep_height"
|
||||
|
||||
[editor]
|
||||
|
||||
|
|
@ -187,6 +187,7 @@ jump={
|
|||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":75,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":3,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
action={
|
||||
|
|
@ -195,6 +196,8 @@ action={
|
|||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":2,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":74,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":1,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777238,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777240,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
reset={
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
extends CanvasLayer
|
||||
|
||||
var is_paused := false
|
||||
onready var menu : Control = $Menu
|
||||
onready var menu_list : Label = $Menu/List
|
||||
onready var menu : Control = $Center/Menu
|
||||
onready var menu_list : Label = $Center/Menu/List
|
||||
|
||||
var cursor := 0
|
||||
var menu_items := ["resume", "reset", "exit"]
|
||||
|
|
@ -10,12 +10,12 @@ var menu_items := ["resume", "reset", "exit"]
|
|||
var timer := 0.1 # prevent input overlap
|
||||
var clock := 0.0
|
||||
|
||||
onready var node_cursor : ColorRect = $Menu/Cursor
|
||||
onready var node_audio_pause : AudioStreamPlayer = $AudioPause
|
||||
onready var node_audio_scroll : AudioStreamPlayer = $AudioScroll
|
||||
onready var node_audio_resume : AudioStreamPlayer = $AudioResume
|
||||
onready var node_audio_reset : AudioStreamPlayer = $AudioReset
|
||||
onready var node_audio_exit : AudioStreamPlayer = $AudioExit
|
||||
onready var node_cursor : ColorRect = $Center/Menu/Cursor
|
||||
onready var node_audio_pause : AudioStreamPlayer = $Audio/Pause
|
||||
onready var node_audio_scroll : AudioStreamPlayer = $Audio/Scroll
|
||||
onready var node_audio_resume : AudioStreamPlayer = $Audio/Resume
|
||||
onready var node_audio_reset : AudioStreamPlayer = $Audio/Reset
|
||||
onready var node_audio_exit : AudioStreamPlayer = $Audio/Exit
|
||||
|
||||
signal pause
|
||||
signal unpause
|
||||
|
|
|
|||
|
|
@ -21,14 +21,19 @@ __meta__ = {
|
|||
"_edit_horizontal_guides_": [ -19.0 ]
|
||||
}
|
||||
|
||||
[node name="Menu" type="Control" parent="."]
|
||||
margin_right = 72.0
|
||||
margin_bottom = 72.0
|
||||
[node name="Center" type="CenterContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="Menu" type="Control" parent="Center"]
|
||||
margin_right = 228.0
|
||||
margin_bottom = 128.0
|
||||
rect_min_size = Vector2( 228, 128 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Paused" type="NinePatchRect" parent="Menu"]
|
||||
[node name="Paused" type="NinePatchRect" parent="Center/Menu"]
|
||||
margin_left = 87.0
|
||||
margin_top = 28.0
|
||||
margin_right = 141.0
|
||||
|
|
@ -45,7 +50,7 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Cursor" type="ColorRect" parent="Menu"]
|
||||
[node name="Cursor" type="ColorRect" parent="Center/Menu"]
|
||||
margin_left = 92.0
|
||||
margin_top = 50.0
|
||||
margin_right = 136.0
|
||||
|
|
@ -55,7 +60,7 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="List" type="Label" parent="Menu"]
|
||||
[node name="List" type="Label" parent="Center/Menu"]
|
||||
margin_left = 87.0
|
||||
margin_top = 52.0
|
||||
margin_right = 141.0
|
||||
|
|
@ -70,7 +75,7 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Header" type="Label" parent="Menu"]
|
||||
[node name="Header" type="Label" parent="Center/Menu"]
|
||||
margin_left = 88.0
|
||||
margin_top = 35.0
|
||||
margin_right = 140.0
|
||||
|
|
@ -85,27 +90,29 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="AudioPause" type="AudioStreamPlayer" parent="."]
|
||||
[node name="Audio" type="Node" parent="."]
|
||||
|
||||
[node name="Pause" type="AudioStreamPlayer" parent="Audio"]
|
||||
stream = ExtResource( 4 )
|
||||
volume_db = -5.0
|
||||
bus = "SFX"
|
||||
|
||||
[node name="AudioScroll" type="AudioStreamPlayer" parent="."]
|
||||
[node name="Scroll" type="AudioStreamPlayer" parent="Audio"]
|
||||
stream = ExtResource( 7 )
|
||||
volume_db = -7.0
|
||||
bus = "SFX"
|
||||
|
||||
[node name="AudioResume" type="AudioStreamPlayer" parent="."]
|
||||
[node name="Resume" type="AudioStreamPlayer" parent="Audio"]
|
||||
stream = ExtResource( 10 )
|
||||
volume_db = -2.0
|
||||
bus = "SFX"
|
||||
|
||||
[node name="AudioReset" type="AudioStreamPlayer" parent="."]
|
||||
[node name="Reset" type="AudioStreamPlayer" parent="Audio"]
|
||||
stream = ExtResource( 11 )
|
||||
volume_db = -4.0
|
||||
bus = "SFX"
|
||||
|
||||
[node name="AudioExit" type="AudioStreamPlayer" parent="."]
|
||||
[node name="Exit" type="AudioStreamPlayer" parent="Audio"]
|
||||
stream = ExtResource( 9 )
|
||||
volume_db = -1.0
|
||||
bus = "SFX"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
extends CanvasLayer
|
||||
|
||||
onready var x := $Buttons/X
|
||||
onready var c := $Buttons/C
|
||||
onready var x := $Center/Control/Buttons/X
|
||||
onready var c := $Center/Control/Buttons/C
|
||||
|
||||
onready var notes := $Notes
|
||||
onready var notes_label := $Notes/Label
|
||||
onready var notes := $Center/Control/Notes
|
||||
onready var notes_label := $Center/Control/Notes/Label
|
||||
|
||||
func _ready():
|
||||
keys(false, false)
|
||||
|
|
|
|||
|
|
@ -20,9 +20,18 @@ shader_param/line_thickness = 1.0
|
|||
layer = 5
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Buttons" type="Node2D" parent="."]
|
||||
[node name="Center" type="CenterContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="X" type="Sprite" parent="Buttons"]
|
||||
[node name="Control" type="Control" parent="Center"]
|
||||
margin_right = 228.0
|
||||
margin_bottom = 128.0
|
||||
rect_min_size = Vector2( 228, 128 )
|
||||
|
||||
[node name="Buttons" type="Node2D" parent="Center/Control"]
|
||||
|
||||
[node name="X" type="Sprite" parent="Center/Control/Buttons"]
|
||||
position = Vector2( 12, 116 )
|
||||
texture = ExtResource( 2 )
|
||||
hframes = 6
|
||||
|
|
@ -30,7 +39,7 @@ vframes = 4
|
|||
frame = 1
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="Label" type="Label" parent="Buttons/X"]
|
||||
[node name="Label" type="Label" parent="Center/Control/Buttons/X"]
|
||||
margin_left = 11.0
|
||||
margin_top = -7.0
|
||||
margin_right = 49.0
|
||||
|
|
@ -41,14 +50,14 @@ custom_constants/shadow_as_outline = 1
|
|||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "select"
|
||||
|
||||
[node name="C" type="Sprite" parent="Buttons"]
|
||||
[node name="C" type="Sprite" parent="Center/Control/Buttons"]
|
||||
position = Vector2( 216, 116 )
|
||||
texture = ExtResource( 2 )
|
||||
hframes = 6
|
||||
vframes = 4
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="Label" type="Label" parent="Buttons/C"]
|
||||
[node name="Label" type="Label" parent="Center/Control/Buttons/C"]
|
||||
margin_left = -38.0
|
||||
margin_top = -7.0
|
||||
margin_right = -10.0
|
||||
|
|
@ -59,7 +68,7 @@ custom_constants/shadow_as_outline = 1
|
|||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "back"
|
||||
|
||||
[node name="Arrows" type="Sprite" parent="Buttons"]
|
||||
[node name="Arrows" type="Sprite" parent="Center/Control/Buttons"]
|
||||
visible = false
|
||||
position = Vector2( 216, 116 )
|
||||
texture = ExtResource( 2 )
|
||||
|
|
@ -68,7 +77,7 @@ vframes = 4
|
|||
frame = 7
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="Label" type="Label" parent="Buttons/Arrows"]
|
||||
[node name="Label" type="Label" parent="Center/Control/Buttons/Arrows"]
|
||||
margin_left = -40.0
|
||||
margin_top = -7.0
|
||||
margin_right = -10.0
|
||||
|
|
@ -79,10 +88,10 @@ custom_constants/shadow_as_outline = 1
|
|||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "move"
|
||||
|
||||
[node name="Notes" type="Node2D" parent="."]
|
||||
[node name="Notes" type="Node2D" parent="Center/Control"]
|
||||
position = Vector2( 218, 11 )
|
||||
|
||||
[node name="Label" type="Label" parent="Notes"]
|
||||
[node name="Label" type="Label" parent="Center/Control/Notes"]
|
||||
margin_left = -70.0
|
||||
margin_top = -6.0
|
||||
margin_right = -9.0
|
||||
|
|
@ -94,7 +103,7 @@ custom_fonts/font = SubResource( 1 )
|
|||
text = "13"
|
||||
align = 2
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Notes"]
|
||||
[node name="Sprite" type="Sprite" parent="Center/Control/Notes"]
|
||||
modulate = Color( 1, 0.945098, 0.909804, 1 )
|
||||
material = SubResource( 2 )
|
||||
texture = ExtResource( 4 )
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@ onready var mat : ShaderMaterial = $ColorRect.material
|
|||
func _ready():
|
||||
image.visible = false
|
||||
easing.clock = easing.time
|
||||
|
||||
image.connect("item_rect_changed", self, "item_rect")
|
||||
item_rect()
|
||||
|
||||
func _physics_process(delta):
|
||||
if is_wipe:
|
||||
|
|
@ -46,4 +49,9 @@ func stop():
|
|||
emit_signal("finish")
|
||||
start(true)
|
||||
|
||||
func item_rect():
|
||||
mat.set_shader_param("size", (image.rect_size / Vector2(228, 128)) * Vector2(14.25, 8))
|
||||
mat.set_shader_param("offset", Vector2(fposmod(image.rect_size.x / 32, 1.0), 0))
|
||||
|
||||
print(mat.get_shader_param("size"), " / ", mat.get_shader_param("offset"))
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ script = ExtResource( 1 )
|
|||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
modulate = Color( 1, 0.945098, 0.909804, 1 )
|
||||
material = SubResource( 1 )
|
||||
margin_right = 228.0
|
||||
margin_bottom = 128.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource( 4 )
|
||||
|
|
|
|||
|
|
@ -7,9 +7,12 @@
|
|||
[node name="Splash" type="Node2D"]
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
margin_right = 228.0
|
||||
margin_bottom = 128.0
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
layer = -1
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="CanvasLayer"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
|
||||
[node name="Logo" type="Sprite" parent="."]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue