diff --git a/Audio/hoest.wav b/Audio/hoest.wav new file mode 100644 index 0000000..bd6d211 Binary files /dev/null and b/Audio/hoest.wav differ diff --git a/Audio/hoest.wav.import b/Audio/hoest.wav.import new file mode 100644 index 0000000..67560e9 --- /dev/null +++ b/Audio/hoest.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://bxwec036mw0br" +path="res://.godot/imported/hoest.wav-db1bcf530880338b8aeee84d33d34318.sample" + +[deps] + +source_file="res://Audio/hoest.wav" +dest_files=["res://.godot/imported/hoest.wav-db1bcf530880338b8aeee84d33d34318.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/Images/Splash.tres b/Images/Splash.tres new file mode 100644 index 0000000..5596d87 --- /dev/null +++ b/Images/Splash.tres @@ -0,0 +1,7 @@ +[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://bmiwm870nqtsq"] + +[ext_resource type="Shader" path="res://Objects/Splash.gdshader" id="1_0s04w"] + +[resource] +shader = ExtResource("1_0s04w") +shader_parameter/opacity = 1.0 diff --git a/Objects/Splash.gdshader b/Objects/Splash.gdshader index 5332d55..c5c1585 100644 --- a/Objects/Splash.gdshader +++ b/Objects/Splash.gdshader @@ -2,7 +2,5 @@ shader_type canvas_item; uniform float opacity : hint_range(0,1); void fragment() { - vec4 c = texture(TEXTURE, UV); - c.a *= opacity; - COLOR = c; + COLOR.a *= opacity; } diff --git a/Scripts/Splash.gd b/Scripts/Splash.gd index 5658f19..76f9aa1 100644 --- a/Scripts/Splash.gd +++ b/Scripts/Splash.gd @@ -10,21 +10,24 @@ var start = false func _ready(): get_tree().get_root().print_tree() anim.playing = true + $Draakje/Hoest.playing = true var size = get_viewport_rect().size anim.position = Vector2(size.x/2, size.y/2) + var bg = get_theme_stylebox("panel") + bg.bg_color = Color("3a223a") func _process(delta): if fadeout: - opacity_dragon -= delta + opacity_dragon -= delta * 2.0 anim.material.set_shader_parameter("opacity", opacity_dragon) + $Draakje/Label.material.set_shader_parameter("opacity", opacity_dragon) if opacity_dragon <= 0.25: if !start: get_tree().root.add_child(room) var bg = get_theme_stylebox("panel") - bg.bg_color = Color.BLACK - opacity_panel -= delta * 4 + #bg.bg_color = Color.BLACK + opacity_panel -= delta * 0.5 bg.bg_color.a = opacity_panel - print(bg) if opacity_panel <= 0: queue_free() diff --git a/Splash.tscn b/Splash.tscn index bd7e8d3..a08698d 100644 --- a/Splash.tscn +++ b/Splash.tscn @@ -1,9 +1,9 @@ -[gd_scene load_steps=29 format=3 uid="uid://d11bii43nlv57"] +[gd_scene load_steps=30 format=3 uid="uid://d11bii43nlv57"] [ext_resource type="Script" path="res://Scripts/Splash.gd" id="1_ab4lr"] [ext_resource type="Texture2D" uid="uid://71lhfy8nm7p6" path="res://Images/draakje/872063671600304149-png_apngframe01.png" id="1_v6etj"] [ext_resource type="Texture2D" uid="uid://c7vpahuckth1m" path="res://Images/draakje/872063671600304149-png_apngframe02.png" id="2_ah87e"] -[ext_resource type="Shader" path="res://Objects/Splash.gdshader" id="2_lkjt0"] +[ext_resource type="Material" uid="uid://bmiwm870nqtsq" path="res://Images/Splash.tres" id="2_cayiq"] [ext_resource type="Texture2D" uid="uid://c17yden3ck4e2" path="res://Images/draakje/872063671600304149-png_apngframe03.png" id="3_8ngcx"] [ext_resource type="Texture2D" uid="uid://lk0rntu7riwc" path="res://Images/draakje/872063671600304149-png_apngframe04.png" id="4_o5bkt"] [ext_resource type="Texture2D" uid="uid://d2o4r8yhf7cby" path="res://Images/draakje/872063671600304149-png_apngframe05.png" id="5_2l6e1"] @@ -25,13 +25,10 @@ [ext_resource type="Texture2D" uid="uid://bddxdc4c07tmm" path="res://Images/draakje/872063671600304149-png_apngframe21.png" id="21_ot667"] [ext_resource type="Texture2D" uid="uid://bmlmk8ccxgg8k" path="res://Images/draakje/872063671600304149-png_apngframe22.png" id="22_ndb6m"] [ext_resource type="Texture2D" uid="uid://bj4dwjugfwi2b" path="res://Images/draakje/872063671600304149-png_apngframe23.png" id="23_nsh3l"] +[ext_resource type="AudioStream" uid="uid://bxwec036mw0br" path="res://Audio/hoest.wav" id="26_yo1dc"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_117ed"] -bg_color = Color(0, 0, 0, 1) - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_7tapm"] -shader = ExtResource("2_lkjt0") -shader_parameter/opacity = 1.0 +bg_color = Color(0.227451, 0.133333, 0.227451, 1) [sub_resource type="SpriteFrames" id="SpriteFrames_wd2ai"] animations = [{ @@ -134,12 +131,27 @@ animations = [{ }, { "duration": 1.0, "texture": ExtResource("23_nsh3l") +}, { +"duration": 1.0, +"texture": ExtResource("1_v6etj") +}, { +"duration": 1.0, +"texture": ExtResource("1_v6etj") +}, { +"duration": 1.0, +"texture": ExtResource("1_v6etj") }], "loop": false, "name": &"default", "speed": 10.0 }] +[sub_resource type="SystemFont" id="SystemFont_8q1ew"] +font_names = PackedStringArray("Noto Sans Khmer") +font_weight = 999 +hinting = 2 +subpixel_positioning = 3 + [node name="Splash" type="Control"] layout_mode = 3 anchors_preset = 15 @@ -161,9 +173,39 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_117ed") script = ExtResource("1_ab4lr") [node name="Draakje" type="AnimatedSprite2D" parent="Panel"] -material = SubResource("ShaderMaterial_7tapm") +material = ExtResource("2_cayiq") +position = Vector2(580, 280) scale = Vector2(2, 2) frames = SubResource("SpriteFrames_wd2ai") +[node name="Label" type="Label" parent="Panel/Draakje"] +material = ExtResource("2_cayiq") +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -349.0 +offset_top = -14.0 +offset_right = 221.0 +offset_bottom = 66.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_colors/font_color = Color(0.32549, 0.662745, 0.494118, 1) +theme_override_colors/font_shadow_color = Color(0.556863, 0.564706, 0.513726, 1) +theme_override_colors/font_outline_color = Color(0, 0, 0, 1) +theme_override_constants/shadow_offset_x = 2 +theme_override_constants/shadow_offset_y = 3 +theme_override_constants/outline_size = 25 +theme_override_constants/shadow_outline_size = 0 +theme_override_fonts/font = SubResource("SystemFont_8q1ew") +theme_override_font_sizes/font_size = 36 +text = "Coughing Dragon" +horizontal_alignment = 1 + +[node name="Hoest" type="AudioStreamPlayer" parent="Panel/Draakje"] +stream = ExtResource("26_yo1dc") +volume_db = -5.059 + [connection signal="item_rect_changed" from="Panel" to="Panel" method="_on_item_rect_changed"] [connection signal="animation_finished" from="Panel/Draakje" to="Panel" method="_on_draakje_animation_finished"]