mirror of
https://github.com/HarmonyHoney/tiny_crate.git
synced 2026-01-23 02:34:53 +00:00
optimize Wipe and UI (: + Android build!
This commit is contained in:
parent
faeb668f21
commit
06afbf5977
27 changed files with 458 additions and 451 deletions
|
|
@ -174,3 +174,209 @@ notarization/apple_team_id=""
|
|||
texture_format/s3tc=true
|
||||
texture_format/etc=false
|
||||
texture_format/etc2=false
|
||||
|
||||
[preset.4]
|
||||
|
||||
name="Android"
|
||||
platform="Android"
|
||||
runnable=true
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="export/android/Tiny-Crate.apk"
|
||||
script_export_mode=1
|
||||
script_encryption_key=""
|
||||
|
||||
[preset.4.options]
|
||||
|
||||
custom_template/debug=""
|
||||
custom_template/release=""
|
||||
custom_build/use_custom_build=false
|
||||
custom_build/export_format=0
|
||||
custom_build/min_sdk=""
|
||||
custom_build/target_sdk=""
|
||||
architectures/armeabi-v7a=true
|
||||
architectures/arm64-v8a=true
|
||||
architectures/x86=false
|
||||
architectures/x86_64=false
|
||||
keystore/debug=""
|
||||
keystore/debug_user=""
|
||||
keystore/debug_password=""
|
||||
keystore/release=""
|
||||
keystore/release_user=""
|
||||
keystore/release_password=""
|
||||
one_click_deploy/clear_previous_install=true
|
||||
version/code=1
|
||||
version/name="1.0"
|
||||
package/unique_name="org.godotengine.$genname"
|
||||
package/name=""
|
||||
package/signed=true
|
||||
package/classify_as_game=true
|
||||
package/retain_data_on_uninstall=false
|
||||
package/exclude_from_recents=false
|
||||
launcher_icons/main_192x192="res://media/image/android_icon.png"
|
||||
launcher_icons/adaptive_foreground_432x432=""
|
||||
launcher_icons/adaptive_background_432x432=""
|
||||
graphics/opengl_debug=false
|
||||
xr_features/xr_mode=0
|
||||
xr_features/hand_tracking=0
|
||||
xr_features/hand_tracking_frequency=0
|
||||
xr_features/passthrough=0
|
||||
screen/immersive_mode=true
|
||||
screen/support_small=true
|
||||
screen/support_normal=true
|
||||
screen/support_large=true
|
||||
screen/support_xlarge=true
|
||||
user_data_backup/allow=false
|
||||
command_line/extra_args=""
|
||||
apk_expansion/enable=false
|
||||
apk_expansion/SALT=""
|
||||
apk_expansion/public_key=""
|
||||
permissions/custom_permissions=PoolStringArray( )
|
||||
permissions/access_checkin_properties=false
|
||||
permissions/access_coarse_location=false
|
||||
permissions/access_fine_location=false
|
||||
permissions/access_location_extra_commands=false
|
||||
permissions/access_mock_location=false
|
||||
permissions/access_network_state=false
|
||||
permissions/access_surface_flinger=false
|
||||
permissions/access_wifi_state=false
|
||||
permissions/account_manager=false
|
||||
permissions/add_voicemail=false
|
||||
permissions/authenticate_accounts=false
|
||||
permissions/battery_stats=false
|
||||
permissions/bind_accessibility_service=false
|
||||
permissions/bind_appwidget=false
|
||||
permissions/bind_device_admin=false
|
||||
permissions/bind_input_method=false
|
||||
permissions/bind_nfc_service=false
|
||||
permissions/bind_notification_listener_service=false
|
||||
permissions/bind_print_service=false
|
||||
permissions/bind_remoteviews=false
|
||||
permissions/bind_text_service=false
|
||||
permissions/bind_vpn_service=false
|
||||
permissions/bind_wallpaper=false
|
||||
permissions/bluetooth=false
|
||||
permissions/bluetooth_admin=false
|
||||
permissions/bluetooth_privileged=false
|
||||
permissions/brick=false
|
||||
permissions/broadcast_package_removed=false
|
||||
permissions/broadcast_sms=false
|
||||
permissions/broadcast_sticky=false
|
||||
permissions/broadcast_wap_push=false
|
||||
permissions/call_phone=false
|
||||
permissions/call_privileged=false
|
||||
permissions/camera=false
|
||||
permissions/capture_audio_output=false
|
||||
permissions/capture_secure_video_output=false
|
||||
permissions/capture_video_output=false
|
||||
permissions/change_component_enabled_state=false
|
||||
permissions/change_configuration=false
|
||||
permissions/change_network_state=false
|
||||
permissions/change_wifi_multicast_state=false
|
||||
permissions/change_wifi_state=false
|
||||
permissions/clear_app_cache=false
|
||||
permissions/clear_app_user_data=false
|
||||
permissions/control_location_updates=false
|
||||
permissions/delete_cache_files=false
|
||||
permissions/delete_packages=false
|
||||
permissions/device_power=false
|
||||
permissions/diagnostic=false
|
||||
permissions/disable_keyguard=false
|
||||
permissions/dump=false
|
||||
permissions/expand_status_bar=false
|
||||
permissions/factory_test=false
|
||||
permissions/flashlight=false
|
||||
permissions/force_back=false
|
||||
permissions/get_accounts=false
|
||||
permissions/get_package_size=false
|
||||
permissions/get_tasks=false
|
||||
permissions/get_top_activity_info=false
|
||||
permissions/global_search=false
|
||||
permissions/hardware_test=false
|
||||
permissions/inject_events=false
|
||||
permissions/install_location_provider=false
|
||||
permissions/install_packages=false
|
||||
permissions/install_shortcut=false
|
||||
permissions/internal_system_window=false
|
||||
permissions/internet=false
|
||||
permissions/kill_background_processes=false
|
||||
permissions/location_hardware=false
|
||||
permissions/manage_accounts=false
|
||||
permissions/manage_app_tokens=false
|
||||
permissions/manage_documents=false
|
||||
permissions/manage_external_storage=false
|
||||
permissions/master_clear=false
|
||||
permissions/media_content_control=false
|
||||
permissions/modify_audio_settings=false
|
||||
permissions/modify_phone_state=false
|
||||
permissions/mount_format_filesystems=false
|
||||
permissions/mount_unmount_filesystems=false
|
||||
permissions/nfc=false
|
||||
permissions/persistent_activity=false
|
||||
permissions/process_outgoing_calls=false
|
||||
permissions/read_calendar=false
|
||||
permissions/read_call_log=false
|
||||
permissions/read_contacts=false
|
||||
permissions/read_external_storage=false
|
||||
permissions/read_frame_buffer=false
|
||||
permissions/read_history_bookmarks=false
|
||||
permissions/read_input_state=false
|
||||
permissions/read_logs=false
|
||||
permissions/read_phone_state=false
|
||||
permissions/read_profile=false
|
||||
permissions/read_sms=false
|
||||
permissions/read_social_stream=false
|
||||
permissions/read_sync_settings=false
|
||||
permissions/read_sync_stats=false
|
||||
permissions/read_user_dictionary=false
|
||||
permissions/reboot=false
|
||||
permissions/receive_boot_completed=false
|
||||
permissions/receive_mms=false
|
||||
permissions/receive_sms=false
|
||||
permissions/receive_wap_push=false
|
||||
permissions/record_audio=false
|
||||
permissions/reorder_tasks=false
|
||||
permissions/restart_packages=false
|
||||
permissions/send_respond_via_message=false
|
||||
permissions/send_sms=false
|
||||
permissions/set_activity_watcher=false
|
||||
permissions/set_alarm=false
|
||||
permissions/set_always_finish=false
|
||||
permissions/set_animation_scale=false
|
||||
permissions/set_debug_app=false
|
||||
permissions/set_orientation=false
|
||||
permissions/set_pointer_speed=false
|
||||
permissions/set_preferred_applications=false
|
||||
permissions/set_process_limit=false
|
||||
permissions/set_time=false
|
||||
permissions/set_time_zone=false
|
||||
permissions/set_wallpaper=false
|
||||
permissions/set_wallpaper_hints=false
|
||||
permissions/signal_persistent_processes=false
|
||||
permissions/status_bar=false
|
||||
permissions/subscribed_feeds_read=false
|
||||
permissions/subscribed_feeds_write=false
|
||||
permissions/system_alert_window=false
|
||||
permissions/transmit_ir=false
|
||||
permissions/uninstall_shortcut=false
|
||||
permissions/update_device_stats=false
|
||||
permissions/use_credentials=false
|
||||
permissions/use_sip=false
|
||||
permissions/vibrate=false
|
||||
permissions/wake_lock=false
|
||||
permissions/write_apn_settings=false
|
||||
permissions/write_calendar=false
|
||||
permissions/write_call_log=false
|
||||
permissions/write_contacts=false
|
||||
permissions/write_external_storage=false
|
||||
permissions/write_gservices=false
|
||||
permissions/write_history_bookmarks=false
|
||||
permissions/write_profile=false
|
||||
permissions/write_secure_settings=false
|
||||
permissions/write_settings=false
|
||||
permissions/write_sms=false
|
||||
permissions/write_social_stream=false
|
||||
permissions/write_sync_settings=false
|
||||
permissions/write_user_dictionary=false
|
||||
|
|
|
|||
BIN
media/image/android_icon.png
Normal file
BIN
media/image/android_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 211 B After Width: | Height: | Size: 248 B |
|
|
@ -29,6 +29,11 @@ _global_script_classes=[ {
|
|||
"language": "GDScript",
|
||||
"path": "res://src/actor/Box.gd"
|
||||
}, {
|
||||
"base": "Reference",
|
||||
"class": "EaseMover",
|
||||
"language": "GDScript",
|
||||
"path": "res://src/class/EaseMover.gd"
|
||||
}, {
|
||||
"base": "Node",
|
||||
"class": "EditorTheme",
|
||||
"language": "GDScript",
|
||||
|
|
@ -64,6 +69,7 @@ _global_script_class_icons={
|
|||
"AsepriteImportData": "",
|
||||
"AsepriteImporter": "",
|
||||
"Box": "",
|
||||
"EaseMover": "",
|
||||
"EditorTheme": "",
|
||||
"Exit": "",
|
||||
"Passthrough": "",
|
||||
|
|
@ -85,10 +91,11 @@ config/windows_native_icon="res://media/image/icon_gimp.ico"
|
|||
|
||||
btn="*res://src/autoload/btn.gd"
|
||||
Shared="*res://src/autoload/Shared.gd"
|
||||
HUD="*res://src/autoload/HUD.tscn"
|
||||
Pause="*res://src/autoload/Pause.tscn"
|
||||
Music="*res://src/autoload/Music.tscn"
|
||||
TouchScreen="*res://src/autoload/touch_screen.tscn"
|
||||
Wipe="*res://src/autoload/Wipe.tscn"
|
||||
UI="*res://src/autoload/UI.tscn"
|
||||
|
||||
[display]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
extends CanvasLayer
|
||||
|
||||
onready var wipe : Node2D = $Wipe
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://src/autoload/HUD.gd" type="Script" id=3]
|
||||
[ext_resource path="res://src/fx/Wipe.tscn" type="PackedScene" id=5]
|
||||
|
||||
[node name="HUD" type="CanvasLayer"]
|
||||
pause_mode = 2
|
||||
layer = 10
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Wipe" parent="." instance=ExtResource( 5 )]
|
||||
|
|
@ -57,6 +57,7 @@ func _input(event):
|
|||
func toggle_pause():
|
||||
is_paused = !is_paused
|
||||
menu.visible = is_paused
|
||||
UI.keys(is_paused, is_paused)
|
||||
clock = timer
|
||||
|
||||
if is_paused:
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
[gd_scene load_steps=13 format=2]
|
||||
[gd_scene load_steps=11 format=2]
|
||||
|
||||
[ext_resource path="res://media/font/m3x6.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://media/image/9slice.png" type="Texture" id=2]
|
||||
[ext_resource path="res://src/autoload/Pause.gd" type="Script" id=3]
|
||||
[ext_resource path="res://media/audio/sfx/sfx3.wav" type="AudioStream" id=4]
|
||||
[ext_resource path="res://media/font/m6x11.ttf" type="DynamicFontData" id=5]
|
||||
[ext_resource path="res://media/font/m6x11.tres" type="DynamicFont" id=6]
|
||||
[ext_resource path="res://media/audio/sfx/hit1.wav" type="AudioStream" id=7]
|
||||
[ext_resource path="res://media/image/btn.png" type="Texture" id=8]
|
||||
[ext_resource path="res://media/audio/sfx/sfx18.wav" type="AudioStream" id=9]
|
||||
[ext_resource path="res://media/audio/sfx/portal7.wav" type="AudioStream" id=10]
|
||||
[ext_resource path="res://media/audio/sfx/portal9.wav" type="AudioStream" id=11]
|
||||
|
|
@ -30,73 +28,6 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Buttons" type="Node2D" parent="Menu"]
|
||||
|
||||
[node name="c" type="Sprite" parent="Menu/Buttons"]
|
||||
position = Vector2( 12, 96 )
|
||||
texture = ExtResource( 8 )
|
||||
hframes = 6
|
||||
vframes = 4
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="c_label" type="Label" parent="Menu/Buttons/c"]
|
||||
margin_left = 11.0
|
||||
margin_top = -6.0
|
||||
margin_right = 39.0
|
||||
margin_bottom = 7.0
|
||||
custom_fonts/font = ExtResource( 6 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
text = "back"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="x" type="Sprite" parent="Menu/Buttons"]
|
||||
position = Vector2( 12, 116 )
|
||||
texture = ExtResource( 8 )
|
||||
hframes = 6
|
||||
vframes = 4
|
||||
frame = 1
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="x_label" type="Label" parent="Menu/Buttons/x"]
|
||||
margin_left = 11.0
|
||||
margin_top = -7.0
|
||||
margin_right = 49.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = ExtResource( 6 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
text = "select"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="arrows" type="Sprite" parent="Menu/Buttons"]
|
||||
position = Vector2( 216, 116 )
|
||||
texture = ExtResource( 8 )
|
||||
hframes = 6
|
||||
vframes = 4
|
||||
frame = 7
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="arrows_label" type="Label" parent="Menu/Buttons/arrows"]
|
||||
margin_left = -40.0
|
||||
margin_top = -7.0
|
||||
margin_right = -10.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = ExtResource( 6 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
text = "move"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Paused" type="NinePatchRect" parent="Menu"]
|
||||
margin_left = 87.0
|
||||
margin_top = 28.0
|
||||
|
|
@ -129,8 +60,8 @@ margin_left = 87.0
|
|||
margin_top = 52.0
|
||||
margin_right = 141.0
|
||||
margin_bottom = 82.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "resume
|
||||
reset
|
||||
exit"
|
||||
|
|
@ -144,10 +75,10 @@ margin_left = 88.0
|
|||
margin_top = 35.0
|
||||
margin_right = 140.0
|
||||
margin_bottom = 50.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "PAUSED"
|
||||
align = 1
|
||||
__meta__ = {
|
||||
|
|
|
|||
|
|
@ -59,8 +59,7 @@ func _ready():
|
|||
print(save_filename + " not found")
|
||||
create_save()
|
||||
|
||||
yield(get_tree(), "idle_frame")
|
||||
HUD.wipe.connect("finish", self, "wipe_finish")
|
||||
Wipe.connect("finish", self, "wipe_finish")
|
||||
|
||||
func _physics_process(delta):
|
||||
# reset timer
|
||||
|
|
@ -103,12 +102,12 @@ func start_reset():
|
|||
|
||||
func do_reset():
|
||||
is_reset = false
|
||||
HUD.wipe.start()
|
||||
Wipe.start()
|
||||
Pause.set_process_input(false)
|
||||
|
||||
func quit_wipe():
|
||||
is_quit = true
|
||||
HUD.wipe.start()
|
||||
Wipe.start()
|
||||
|
||||
func wipe_finish():
|
||||
if is_quit:
|
||||
|
|
@ -121,8 +120,9 @@ func change_map():
|
|||
is_level_select = scene_path == level_select_path
|
||||
is_in_game = scene_path.begins_with(map_path) or scene_path.begins_with(win_screen_path)
|
||||
TouchScreen.pause.visible = is_in_game
|
||||
HUD.wipe.start(true)
|
||||
Pause.set_process_input(true)
|
||||
|
||||
UI.keys(false, false)
|
||||
|
||||
func set_map(arg):
|
||||
current_map = clamp(arg, 0, Shared.maps.size() - 1)
|
||||
|
|
|
|||
11
src/autoload/UI.gd
Normal file
11
src/autoload/UI.gd
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
extends CanvasLayer
|
||||
|
||||
onready var x := $Buttons/X
|
||||
onready var c := $Buttons/C
|
||||
|
||||
func _ready():
|
||||
keys(false, false)
|
||||
|
||||
func keys(left := true, right := true):
|
||||
x.visible = left
|
||||
c.visible = right
|
||||
68
src/autoload/UI.tscn
Normal file
68
src/autoload/UI.tscn
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://media/font/m6x11.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://media/image/btn.png" type="Texture" id=2]
|
||||
[ext_resource path="res://src/autoload/UI.gd" type="Script" id=3]
|
||||
|
||||
[node name="UI" type="CanvasLayer"]
|
||||
layer = 5
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Buttons" type="Node2D" parent="."]
|
||||
|
||||
[node name="X" type="Sprite" parent="Buttons"]
|
||||
position = Vector2( 12, 116 )
|
||||
texture = ExtResource( 2 )
|
||||
hframes = 6
|
||||
vframes = 4
|
||||
frame = 1
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="Label" type="Label" parent="Buttons/X"]
|
||||
margin_left = 11.0
|
||||
margin_top = -7.0
|
||||
margin_right = 49.0
|
||||
margin_bottom = 6.0
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "select"
|
||||
|
||||
[node name="C" type="Sprite" parent="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"]
|
||||
margin_left = -38.0
|
||||
margin_top = -7.0
|
||||
margin_right = -10.0
|
||||
margin_bottom = 6.0
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "back"
|
||||
|
||||
[node name="Arrows" type="Sprite" parent="Buttons"]
|
||||
visible = false
|
||||
position = Vector2( 216, 116 )
|
||||
texture = ExtResource( 2 )
|
||||
hframes = 6
|
||||
vframes = 4
|
||||
frame = 7
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="Label" type="Label" parent="Buttons/Arrows"]
|
||||
margin_left = -40.0
|
||||
margin_top = -7.0
|
||||
margin_right = -10.0
|
||||
margin_bottom = 6.0
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "move"
|
||||
49
src/autoload/Wipe.gd
Normal file
49
src/autoload/Wipe.gd
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
extends CanvasLayer
|
||||
|
||||
signal finish
|
||||
|
||||
var is_wipe := false
|
||||
export var is_reverse = false
|
||||
|
||||
var frame = 0
|
||||
# last frame
|
||||
export var last = 14
|
||||
|
||||
onready var easing := EaseMover.new(0.45)
|
||||
onready var audio : AudioStreamPlayer2D = $AudioStreamPlayer2D
|
||||
onready var image := $ColorRect
|
||||
onready var mat : ShaderMaterial = $ColorRect.material
|
||||
|
||||
func _ready():
|
||||
image.visible = false
|
||||
easing.clock = easing.time
|
||||
|
||||
func _physics_process(delta):
|
||||
if is_wipe:
|
||||
easing.count(delta)
|
||||
var f = lerp(0.0, last + 1, easing.frac())
|
||||
mat.set_shader_param("frame", (last - f) if is_reverse else f)
|
||||
|
||||
if easing.is_complete:
|
||||
stop()
|
||||
|
||||
func start(_reverse = false):
|
||||
is_wipe = true
|
||||
easing.reset()
|
||||
image.visible = true
|
||||
|
||||
is_reverse = _reverse
|
||||
if !is_reverse:
|
||||
audio.play()
|
||||
|
||||
func stop():
|
||||
is_wipe = false
|
||||
if is_reverse:
|
||||
pass
|
||||
#image.visible = false
|
||||
else:
|
||||
emit_signal("finish")
|
||||
yield(get_tree(),"idle_frame")
|
||||
start(true)
|
||||
|
||||
|
||||
29
src/autoload/Wipe.tscn
Normal file
29
src/autoload/Wipe.tscn
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://src/autoload/Wipe.gd" type="Script" id=1]
|
||||
[ext_resource path="res://media/image/wipe.png" type="Texture" id=2]
|
||||
[ext_resource path="res://src/shader/wipe.gdshader" type="Shader" id=3]
|
||||
[ext_resource path="res://media/audio/sfx/portal0.wav" type="AudioStream" id=4]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=1]
|
||||
shader = ExtResource( 3 )
|
||||
shader_param/offset = Vector2( 0.125, 0 )
|
||||
shader_param/size = Vector2( 14.25, 8 )
|
||||
shader_param/frames = Vector2( 4, 4 )
|
||||
shader_param/frame = 6
|
||||
shader_param/tex = ExtResource( 2 )
|
||||
|
||||
[node name="Wipe" type="CanvasLayer"]
|
||||
pause_mode = 2
|
||||
layer = 10
|
||||
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
|
||||
|
||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource( 4 )
|
||||
bus = "SFX"
|
||||
|
|
@ -1,15 +1,7 @@
|
|||
extends CanvasLayer
|
||||
|
||||
onready var node : Node2D = $Node2D
|
||||
onready var pause : TouchScreenButton = $Node2D/Pause
|
||||
|
||||
export var vis := false setget set_vis, get_vis
|
||||
|
||||
func _ready():
|
||||
set_vis(OS.has_touchscreen_ui_hint() and OS.get_name() == "HTML5")
|
||||
visible = (OS.has_touchscreen_ui_hint() and OS.get_name() == "HTML5") or OS.get_name() == "Android"
|
||||
|
||||
func set_vis(arg := false):
|
||||
node.visible = arg
|
||||
|
||||
func get_vis():
|
||||
return node.visible
|
||||
|
|
|
|||
|
|
@ -111,9 +111,6 @@ custom_fonts/font = ExtResource( 2 )
|
|||
text = "x"
|
||||
align = 1
|
||||
valign = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Pause" type="TouchScreenButton" parent="Node2D"]
|
||||
position = Vector2( 208, 20 )
|
||||
|
|
|
|||
42
src/class/EaseMover.gd
Normal file
42
src/class/EaseMover.gd
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
class_name EaseMover
|
||||
|
||||
var show := true
|
||||
var clock := 0.0
|
||||
var time := 0.5
|
||||
var from := Vector2.ZERO
|
||||
var to := Vector2.ZERO
|
||||
var current := Vector2.ZERO
|
||||
var node
|
||||
|
||||
var is_complete setget , get_complete
|
||||
|
||||
func _init(_time := time, _from := from, _to := to, _node := node):
|
||||
time = _time
|
||||
from = _from
|
||||
to = _to
|
||||
node = _node
|
||||
|
||||
func count(delta, arg := show):
|
||||
clock = clamp(clock + (delta if arg else -delta), 0, time)
|
||||
return smooth()
|
||||
|
||||
func frac():
|
||||
return clock / time
|
||||
|
||||
func smooth():
|
||||
return smoothstep(0, 1, clock / time)
|
||||
|
||||
func get_complete():
|
||||
return clock == time
|
||||
|
||||
func move(delta, arg := show):
|
||||
count(delta, arg)
|
||||
current = from.linear_interpolate(to, smooth())
|
||||
|
||||
if node:
|
||||
node.rect_position = current
|
||||
|
||||
return current
|
||||
|
||||
func reset():
|
||||
clock = 0.0
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
extends Node2D
|
||||
|
||||
var sprite : Sprite
|
||||
onready var sprites : Node2D = $Sprites
|
||||
|
||||
export var act = false
|
||||
export var backwards = false
|
||||
|
||||
var tick = 0.03
|
||||
var clock = 0
|
||||
|
||||
var frame = 0
|
||||
# last frame
|
||||
export var last = 14
|
||||
|
||||
signal finish
|
||||
|
||||
onready var audio : AudioStreamPlayer2D = $AudioStreamPlayer2D
|
||||
|
||||
func _ready():
|
||||
sprite = $Sprites/Sprite.duplicate()
|
||||
$Sprites/Sprite.queue_free()
|
||||
|
||||
for y in 12:
|
||||
for x in 21:
|
||||
var s = sprite.duplicate()
|
||||
s.position = Vector2(x, y) * 16
|
||||
sprites.add_child(s)
|
||||
|
||||
start() if act else stop(false)
|
||||
|
||||
func _physics_process(delta):
|
||||
clock -= delta
|
||||
if clock < 0:
|
||||
clock += tick
|
||||
frame += 1
|
||||
|
||||
if frame > last:
|
||||
sprites.visible = false
|
||||
stop(not backwards)
|
||||
return
|
||||
|
||||
for i in sprites.get_children():
|
||||
i.frame = clamp(last - frame if backwards else frame, 0, last)
|
||||
|
||||
func start(_backwards = false):
|
||||
act = true
|
||||
set_physics_process(true)
|
||||
frame = 0
|
||||
clock = tick
|
||||
backwards = _backwards
|
||||
sprites.visible = true
|
||||
if !backwards:
|
||||
audio.play()
|
||||
|
||||
func stop(_emit_signal = true):
|
||||
act = false
|
||||
set_physics_process(false)
|
||||
sprites.visible = false
|
||||
|
||||
if _emit_signal:
|
||||
emit_signal("finish")
|
||||
|
||||
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://media/image/wipe.png" type="Texture" id=1]
|
||||
[ext_resource path="res://media/audio/sfx/portal0.wav" type="AudioStream" id=2]
|
||||
[ext_resource path="res://src/fx/Wipe.gd" type="Script" id=3]
|
||||
|
||||
[node name="Wipe" type="Node2D"]
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Sprites" type="Node2D" parent="."]
|
||||
modulate = Color( 1, 0.945098, 0.909804, 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Sprites"]
|
||||
texture = ExtResource( 1 )
|
||||
hframes = 4
|
||||
vframes = 4
|
||||
region_rect = Rect2( 0, 0, 16, 16 )
|
||||
|
||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource( 2 )
|
||||
bus = "SFX"
|
||||
|
|
@ -8,6 +8,7 @@ onready var node_audio_scroll : AudioStreamPlayer = $AudioScroll
|
|||
|
||||
func _ready():
|
||||
select_item(0)
|
||||
UI.keys()
|
||||
|
||||
func _input(event):
|
||||
var up = event.is_action_pressed("up")
|
||||
|
|
@ -18,7 +19,7 @@ func _input(event):
|
|||
var yes = event.is_action_pressed("jump")
|
||||
var no = event.is_action_pressed("action")
|
||||
|
||||
if TouchScreen.vis:
|
||||
if TouchScreen.visible:
|
||||
if left or right:
|
||||
select_item(cursor + (-1 if left else 1))
|
||||
node_audio_scroll.pitch_scale = 1 + rand_range(-0.2, 0.2)
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
[gd_scene load_steps=27 format=2]
|
||||
[gd_scene load_steps=26 format=2]
|
||||
|
||||
[ext_resource path="res://media/font/m3x6.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://media/image/9slice.png" type="Texture" id=2]
|
||||
[ext_resource path="res://src/menu/OptionsMenu.gd" type="Script" id=3]
|
||||
[ext_resource path="res://media/image/tinyArrow.png" type="Texture" id=4]
|
||||
[ext_resource path="res://media/font/m6x11.ttf" type="DynamicFontData" id=5]
|
||||
[ext_resource path="res://media/font/m6x11.tres" type="DynamicFont" id=6]
|
||||
[ext_resource path="res://src/actor/Exit.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://media/audio/sfx/sfx5.wav" type="AudioStream" id=7]
|
||||
[ext_resource path="res://src/stage/DetailTileMap.tscn" type="PackedScene" id=8]
|
||||
[ext_resource path="res://media/audio/sfx/portal7.wav" type="AudioStream" id=9]
|
||||
|
|
@ -14,7 +14,6 @@
|
|||
[ext_resource path="res://media/audio/sfx/btn0.wav" type="AudioStream" id=12]
|
||||
[ext_resource path="res://src/stage/GameCamera.tscn" type="PackedScene" id=13]
|
||||
[ext_resource path="res://media/audio/sfx/hit1.wav" type="AudioStream" id=14]
|
||||
[ext_resource path="res://media/image/btn.png" type="Texture" id=16]
|
||||
[ext_resource path="res://media/audio/sfx/sfx3.wav" type="AudioStream" id=17]
|
||||
[ext_resource path="res://media/audio/sfx/sfx14.wav" type="AudioStream" id=18]
|
||||
|
||||
|
|
@ -141,11 +140,11 @@ onready var fill = $Box/Fill
|
|||
var is_selected = false
|
||||
|
||||
func _ready():
|
||||
fill.visible = TouchScreen.node.visible
|
||||
fill.visible = TouchScreen.visible
|
||||
|
||||
func act():
|
||||
var is_touch = !TouchScreen.vis
|
||||
TouchScreen.vis = is_touch
|
||||
var is_touch = !TouchScreen.visible
|
||||
TouchScreen.visible = is_touch
|
||||
fill.visible = is_touch
|
||||
"
|
||||
|
||||
|
|
@ -177,9 +176,6 @@ margin_top = 23.0
|
|||
margin_right = 200.0
|
||||
margin_bottom = 35.0
|
||||
color = Color( 0.113725, 0.168627, 0.32549, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Header" type="Label" parent="."]
|
||||
margin_left = 14.0
|
||||
|
|
@ -679,77 +675,18 @@ bus = "SFX"
|
|||
[node name="Stage" type="Node2D" parent="."]
|
||||
|
||||
[node name="SolidTileMap" parent="Stage" instance=ExtResource( 11 )]
|
||||
tile_data = PoolIntArray( -131061, 0, 1, -131052, 0, 0, -65525, 0, 0, -65516, 0, 1, 11, 0, 1, 20, 0, 0, 65542, 0, 0, 65543, 0, 1, 65544, 0, 1, 65545, 0, 0, 65546, 0, 1, 65547, 536870912, 0, 65556, 0, 0, 65557, 0, 1, 65558, 536870912, 1, 65559, 536870912, 0, 65560, 0, 1, 65561, 536870912, 0, 131078, 0, 1, 131097, 0, 1, 196610, 0, 0, 196611, 0, 1, 196612, 0, 0, 196613, 0, 1, 196614, 536870912, 0, 196633, 536870912, 0, 262146, 0, 1, 262169, 0, 0, 327682, 536870912, 0, 327705, 0, 1, 393218, 536870912, 0, 393241, 0, 0, 393242, 0, 1, 393243, 536870912, 0, 393244, 0, 1, 393245, 536870912, 0, 458754, 0, 1, 458781, 0, 1, 524290, 0, 0, 524317, 0, 0, 589826, 0, 1, 589853, 0, 1, 655362, 0, 0, 655363, 0, 1, 655364, 536870912, 0, 655365, 0, 1, 655366, 536870912, 0, 655389, 0, 0, 720902, 0, 0, 720925, 536870912, 0, 786438, 0, 1, 786461, 0, 1, 851974, 0, 0, 851993, 0, 0, 851994, 0, 1, 851995, 0, 0, 851996, 0, 1, 851997, 536870912, 0, 917510, 0, 0, 917529, 0, 1, 983046, 0, 1, 983065, 536870912, 0, 1048582, 0, 1, 1048601, 0, 0 )
|
||||
|
||||
[node name="DetailTileMap" parent="Stage" instance=ExtResource( 8 )]
|
||||
z_index = -11
|
||||
tile_data = PoolIntArray( -131062, 5, 0, -131051, 5, 0, -65526, 5, 0, -65515, 5, 0, 8, 5, 2, 9, 5, 0, 10, -1073741819, 0, 21, -1610612731, 0, 22, 5, 0, 23, 536870917, 2, 131075, 5, 2, 131076, 5, 0, 131077, 5, 0, 131079, 5, 0, 131080, 1610612741, 2, 131095, 1073741829, 2, 131096, 5, 0, 131098, -1610612731, 2, 196615, 1610612741, 2, 196632, 1073741829, 2, 196634, 1610612741, 0, 262147, 1610612741, 2, 262170, -1610612731, 0, 327684, 5, 2, 327685, 5, 0, 327686, -1610612731, 2, 327706, 5, 0, 327707, 536870917, 2, 393220, 5, 0, 393221, 5, 0, 393222, 5, 0, 458756, -1073741819, 2, 458757, 5, 0, 458758, 1610612741, 2, 458778, 5, 1, 458779, 1610612741, 2, 524293, 1610612741, 1, 524314, 5, 1, 589828, 5, 2, 589829, 1610612741, 1, 589849, 5, 2, 589850, 5, 0, 589851, -1610612731, 2, 655385, 5, 0, 655386, 5, 0, 655387, 5, 0, 720900, 1073741829, 2, 720901, 5, 0, 720903, -1610612731, 2, 720921, -1073741819, 2, 720922, 5, 0, 720923, 1610612741, 2, 786439, 1610612741, 0, 786460, 5, 2, 851975, 1610612741, 0, 917511, 1610612741, 0, 917528, -2147483643, 2, 917530, 5, 0, 917531, 5, 0, 917532, 1610612741, 2, 983047, 1610612741, 0, 983064, -2147483643, 0, 1048583, 1610612741, 0, 1048600, -2147483643, 0 )
|
||||
|
||||
[node name="GameCamera" parent="Stage" instance=ExtResource( 13 )]
|
||||
position = Vector2( 128, 64 )
|
||||
current = false
|
||||
|
||||
[node name="Buttons" type="Node2D" parent="."]
|
||||
position = Vector2( 14, 0 )
|
||||
[node name="Actors" type="Node2D" parent="Stage"]
|
||||
|
||||
[node name="c" type="Sprite" parent="Buttons"]
|
||||
position = Vector2( 12, 12 )
|
||||
texture = ExtResource( 16 )
|
||||
hframes = 6
|
||||
vframes = 4
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="c_label" type="Label" parent="Buttons/c"]
|
||||
margin_left = 11.0
|
||||
margin_top = -6.0
|
||||
margin_right = 39.0
|
||||
margin_bottom = 7.0
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 6 )
|
||||
text = "back"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="x" type="Sprite" parent="Buttons"]
|
||||
position = Vector2( 12, 116 )
|
||||
texture = ExtResource( 16 )
|
||||
hframes = 6
|
||||
vframes = 4
|
||||
frame = 1
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="x_label" type="Label" parent="Buttons/x"]
|
||||
margin_left = 11.0
|
||||
margin_top = -7.0
|
||||
margin_right = 49.0
|
||||
margin_bottom = 6.0
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 6 )
|
||||
text = "select"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="arrows" type="Sprite" parent="Buttons"]
|
||||
position = Vector2( 216, 116 )
|
||||
texture = ExtResource( 16 )
|
||||
hframes = 6
|
||||
vframes = 4
|
||||
frame = 7
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="arrows_label" type="Label" parent="Buttons/arrows"]
|
||||
margin_left = -40.0
|
||||
margin_top = -7.0
|
||||
margin_right = -10.0
|
||||
margin_bottom = 6.0
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 6 )
|
||||
text = "move"
|
||||
[node name="Exit" parent="Stage/Actors" instance=ExtResource( 6 )]
|
||||
position = Vector2( 221, 21 )
|
||||
|
||||
[editable path="Stage/GameCamera"]
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ var is_input = true
|
|||
func _ready():
|
||||
menu_list = main_list
|
||||
switch_menu("main")
|
||||
UI.keys()
|
||||
|
||||
func _input(event):
|
||||
if !is_input:
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
[gd_scene load_steps=26 format=2]
|
||||
[gd_scene load_steps=24 format=2]
|
||||
|
||||
[ext_resource path="res://media/font/m3x6.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://media/image/9slice.png" type="Texture" id=2]
|
||||
[ext_resource path="res://src/menu/StartMenu.gd" type="Script" id=3]
|
||||
[ext_resource path="res://media/font/m3x6.ttf" type="DynamicFontData" id=4]
|
||||
[ext_resource path="res://media/font/m6x11.ttf" type="DynamicFontData" id=5]
|
||||
[ext_resource path="res://media/font/m6x11.tres" type="DynamicFont" id=6]
|
||||
[ext_resource path="res://media/audio/sfx/hit1.wav" type="AudioStream" id=7]
|
||||
[ext_resource path="res://src/stage/DetailTileMap.tscn" type="PackedScene" id=8]
|
||||
[ext_resource path="res://src/actor/Box.tscn" type="PackedScene" id=9]
|
||||
|
|
@ -15,7 +14,6 @@
|
|||
[ext_resource path="res://src/stage/GameCamera.tscn" type="PackedScene" id=13]
|
||||
[ext_resource path="res://src/actor/SwitchBlockBlue.tscn" type="PackedScene" id=14]
|
||||
[ext_resource path="res://src/actor/SwitchBlue.tscn" type="PackedScene" id=15]
|
||||
[ext_resource path="res://media/image/btn.png" type="Texture" id=16]
|
||||
[ext_resource path="res://media/font/m5x7.tres" type="DynamicFont" id=17]
|
||||
[ext_resource path="res://media/audio/sfx/sfx3.wav" type="AudioStream" id=18]
|
||||
[ext_resource path="res://media/audio/sfx/sfx18.wav" type="AudioStream" id=19]
|
||||
|
|
@ -37,53 +35,6 @@ font_data = ExtResource( 4 )
|
|||
pause_mode = 2
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Buttons" type="Node2D" parent="."]
|
||||
position = Vector2( -18, 8 )
|
||||
|
||||
[node name="x" type="Sprite" parent="Buttons"]
|
||||
position = Vector2( 12, 116 )
|
||||
texture = ExtResource( 16 )
|
||||
hframes = 6
|
||||
vframes = 4
|
||||
frame = 1
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="x_label" type="Label" parent="Buttons/x"]
|
||||
margin_left = 11.0
|
||||
margin_top = -7.0
|
||||
margin_right = 49.0
|
||||
margin_bottom = 6.0
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 6 )
|
||||
text = "select"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="arrows" type="Sprite" parent="Buttons"]
|
||||
position = Vector2( 216, 116 )
|
||||
texture = ExtResource( 16 )
|
||||
hframes = 6
|
||||
vframes = 4
|
||||
frame = 7
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="arrows_label" type="Label" parent="Buttons/arrows"]
|
||||
margin_left = -40.0
|
||||
margin_top = -7.0
|
||||
margin_right = -10.0
|
||||
margin_bottom = 6.0
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 6 )
|
||||
text = "move"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Menu" type="Node2D" parent="."]
|
||||
position = Vector2( -18, 8 )
|
||||
z_index = 20
|
||||
|
|
@ -263,8 +214,6 @@ position = Vector2( 64, 40 )
|
|||
|
||||
[node name="SwitchBlue" parent="Stage/Actors" instance=ExtResource( 15 )]
|
||||
position = Vector2( 64, 44 )
|
||||
tag = "False"
|
||||
is_solid = false
|
||||
|
||||
[node name="SwitchBlockBlue" parent="Stage/Actors" instance=ExtResource( 14 )]
|
||||
position = Vector2( 104, 96 )
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
UI.keys(false, true)
|
||||
|
||||
func _input(event):
|
||||
if event.is_action_pressed("action"):
|
||||
Shared.scene_path = Shared.main_menu_path
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://media/font/m3x6.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://media/font/m6x11.tres" type="DynamicFont" id=2]
|
||||
[ext_resource path="res://media/image/btn.png" type="Texture" id=3]
|
||||
[ext_resource path="res://src/menu/credits.gd" type="Script" id=4]
|
||||
[ext_resource path="res://media/audio/sfx/Randomize103.wav" type="AudioStream" id=5]
|
||||
|
||||
|
|
@ -30,24 +28,3 @@ by Daniel Linssen
|
|||
|
||||
visit hhoney.net for more! <3"
|
||||
align = 1
|
||||
|
||||
[node name="c" type="Sprite" parent="."]
|
||||
position = Vector2( 12, 12 )
|
||||
texture = ExtResource( 3 )
|
||||
hframes = 6
|
||||
vframes = 4
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="c_label" type="Label" parent="c"]
|
||||
margin_left = 11.0
|
||||
margin_top = -6.0
|
||||
margin_right = 39.0
|
||||
margin_bottom = 7.0
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 2 )
|
||||
text = "back"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ onready var node_audio_back : AudioStreamPlayer = $AudioBack
|
|||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
Shared.is_level_select = true
|
||||
UI.keys()
|
||||
|
||||
# make screens
|
||||
screen = $Control/Screen.duplicate()
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
[gd_scene load_steps=12 format=2]
|
||||
[gd_scene load_steps=10 format=2]
|
||||
|
||||
[ext_resource path="res://media/image/corner.png" type="Texture" id=1]
|
||||
[ext_resource path="res://media/font/m3x6.tres" type="DynamicFont" id=2]
|
||||
[ext_resource path="res://media/image/btn.png" type="Texture" id=3]
|
||||
[ext_resource path="res://media/font/m6x11.tres" type="DynamicFont" id=4]
|
||||
[ext_resource path="res://media/audio/sfx/Randomize103.wav" type="AudioStream" id=5]
|
||||
[ext_resource path="res://src/shader/outline2D_outer.shader" type="Shader" id=6]
|
||||
[ext_resource path="res://src/menu/select.gd" type="Script" id=7]
|
||||
|
|
@ -209,112 +207,3 @@ color = Color( 0.113725, 0.168627, 0.32549, 1 )
|
|||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="HUD" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="Buttons" type="Node2D" parent="HUD"]
|
||||
|
||||
[node name="Unused" type="Node2D" parent="HUD/Buttons"]
|
||||
visible = false
|
||||
|
||||
[node name="esc" type="Sprite" parent="HUD/Buttons/Unused"]
|
||||
position = Vector2( 28, 19 )
|
||||
texture = ExtResource( 3 )
|
||||
hframes = 3
|
||||
vframes = 4
|
||||
frame = 6
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="esc_label" type="Label" parent="HUD/Buttons/Unused"]
|
||||
margin_left = 49.0
|
||||
margin_top = 13.0
|
||||
margin_right = 79.0
|
||||
margin_bottom = 26.0
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 4 )
|
||||
text = "menu"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ent" type="Sprite" parent="HUD/Buttons/Unused"]
|
||||
position = Vector2( -52, 18 )
|
||||
texture = ExtResource( 3 )
|
||||
hframes = 3
|
||||
vframes = 4
|
||||
frame = 7
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="return" type="Sprite" parent="HUD/Buttons/Unused"]
|
||||
position = Vector2( -56, 43 )
|
||||
texture = ExtResource( 3 )
|
||||
hframes = 3
|
||||
vframes = 4
|
||||
frame = 10
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="c" type="Sprite" parent="HUD/Buttons"]
|
||||
position = Vector2( 12, 12 )
|
||||
texture = ExtResource( 3 )
|
||||
hframes = 6
|
||||
vframes = 4
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="c_label" type="Label" parent="HUD/Buttons/c"]
|
||||
margin_left = 11.0
|
||||
margin_top = -6.0
|
||||
margin_right = 39.0
|
||||
margin_bottom = 7.0
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 4 )
|
||||
text = "back"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="x" type="Sprite" parent="HUD/Buttons"]
|
||||
position = Vector2( 12, 116 )
|
||||
texture = ExtResource( 3 )
|
||||
hframes = 6
|
||||
vframes = 4
|
||||
frame = 1
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="x_label" type="Label" parent="HUD/Buttons/x"]
|
||||
margin_left = 11.0
|
||||
margin_top = -7.0
|
||||
margin_right = 49.0
|
||||
margin_bottom = 6.0
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 4 )
|
||||
text = "select"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="arrows" type="Sprite" parent="HUD/Buttons"]
|
||||
position = Vector2( 216, 116 )
|
||||
texture = ExtResource( 3 )
|
||||
hframes = 6
|
||||
vframes = 4
|
||||
frame = 7
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[node name="arrows_label" type="Label" parent="HUD/Buttons/arrows"]
|
||||
margin_left = -40.0
|
||||
margin_top = -7.0
|
||||
margin_right = -10.0
|
||||
margin_bottom = 6.0
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 4 )
|
||||
text = "move"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
|
|
|||
15
src/shader/wipe.gdshader
Normal file
15
src/shader/wipe.gdshader
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
shader_type canvas_item;
|
||||
|
||||
uniform vec2 offset = vec2(0.0);
|
||||
|
||||
uniform vec2 size = vec2(16, 9);
|
||||
uniform sampler2D tex;
|
||||
uniform vec2 frames = vec2(4, 4);
|
||||
uniform int frame = 0;
|
||||
|
||||
|
||||
void fragment(){
|
||||
vec2 fv = vec2(float(frame % int(frames.x)), floor(float(frame) / frames.y));
|
||||
|
||||
COLOR = texture(tex, (mod(UV * size - offset, 1.0) + fv) / frames);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue