polish9
Co-authored-by: m.sonaglioni <m.sonaglioni@jmpgames.it> Co-committed-by: m.sonaglioni <m.sonaglioni@jmpgames.it>
This commit was merged in pull request #39.
This commit is contained in:
@@ -1,17 +1,29 @@
|
||||
extends Control
|
||||
|
||||
@export var main_menu_scene: PackedScene
|
||||
@export var display_time: float = 2.0
|
||||
@export var fade_in_time: float = 0.5
|
||||
@export var initial_delay: float = 0.5
|
||||
@export var logo_fade_in_time: float = 1.0
|
||||
@export var logo_display_time: float = 2.0
|
||||
@export var logo_fade_out_time: float = 1.0
|
||||
@export var black_screen_delay: float = 0.5
|
||||
|
||||
@onready var logo: Sprite2D = $ColorRect/JMPLogo
|
||||
|
||||
func _ready() -> void:
|
||||
logo.modulate.a = 0.0
|
||||
await get_tree().create_timer(fade_in_time).timeout
|
||||
await get_tree().create_timer(initial_delay).timeout
|
||||
|
||||
var tween := create_tween()
|
||||
tween.tween_property(logo, "modulate:a", 1.0, fade_in_time).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT)
|
||||
var tween_in := create_tween()
|
||||
tween_in.tween_property(logo, "modulate:a", 1.0, logo_fade_in_time).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT)
|
||||
await tween_in.finished
|
||||
|
||||
await get_tree().create_timer(display_time).timeout
|
||||
#tween = create_tween()
|
||||
#tween.tween_property(logo, "modulate:a", 0.0, fade_in_time).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT)
|
||||
SceneManager.change_scene_with_standard_fade(SceneConfig.SceneName.MAIN_MENU, 0.5)
|
||||
await get_tree().create_timer(logo_display_time).timeout
|
||||
|
||||
var tween_out := create_tween()
|
||||
tween_out.tween_property(logo, "modulate:a", 0.0, logo_fade_out_time).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_IN)
|
||||
await tween_out.finished
|
||||
|
||||
# Aspetta lo schermo nero prima di caricare il menu principale
|
||||
await get_tree().create_timer(black_screen_delay).timeout
|
||||
|
||||
get_tree().change_scene_to_packed(main_menu_scene)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
[ext_resource type="Script" uid="uid://ckj2pcoxi5j3" path="res://core/splash_screen/splash_screen.gd" id="1_elsnp"]
|
||||
[ext_resource type="Texture2D" uid="uid://dp3qxncy8u184" path="res://core/splash_screen/jmp_logo.png" id="1_jkpgl"]
|
||||
[ext_resource type="PackedScene" uid="uid://btcpge7cj2041" path="res://core/main_menu/main_menu.tscn" id="2_qmlqp"]
|
||||
|
||||
[node name="Control" type="Control" unique_id=163470013]
|
||||
layout_mode = 3
|
||||
@@ -11,6 +12,8 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_elsnp")
|
||||
main_menu_scene = ExtResource("2_qmlqp")
|
||||
logo_display_time = 1.25
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=1599828641]
|
||||
layout_mode = 1
|
||||
|
||||
BIN
core/splash_screen/tgcc_logo.png
Normal file
BIN
core/splash_screen/tgcc_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 240 KiB |
40
core/splash_screen/tgcc_logo.png.import
Normal file
40
core/splash_screen/tgcc_logo.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dlrq07g7w5gg8"
|
||||
path="res://.godot/imported/tgcc_logo.png-31dd91a5ccff8eb02e16f9fd08dfa111.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/splash_screen/tgcc_logo.png"
|
||||
dest_files=["res://.godot/imported/tgcc_logo.png-31dd91a5ccff8eb02e16f9fd08dfa111.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Reference in New Issue
Block a user