Skippable intro

This commit is contained in:
Marco 2025-02-24 21:54:20 +01:00
commit d96d662c78
4 changed files with 26 additions and 21 deletions

View file

@ -82,7 +82,7 @@ script = ExtResource("7_l32kg")
EggIndex = 0
StartingEquipment = Array[ExtResource("6_8tdlb")]([ExtResource("6_khabp")])
[sub_resource type="Shader" id="Shader_8tdlb"]
[sub_resource type="Shader" id="Shader_ji7au"]
resource_local_to_scene = true
code = "shader_type canvas_item;
@ -106,9 +106,9 @@ void fragment() {
COLOR = color;
}"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ji7au"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_yot54"]
resource_local_to_scene = true
shader = SubResource("Shader_8tdlb")
shader = SubResource("Shader_ji7au")
shader_parameter/blink_color = Color(0, 0, 0, 1)
shader_parameter/blink_intensity = 0.0
shader_parameter/teleport_progress = 0.0
@ -147,7 +147,7 @@ source = 5
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_81ys3"]
input_name = "time"
[sub_resource type="VisualShader" id="VisualShader_yot54"]
[sub_resource type="VisualShader" id="VisualShader_fasrq"]
resource_local_to_scene = true
code = "shader_type canvas_item;
render_mode blend_mix;
@ -229,11 +229,11 @@ nodes/fragment/11/node = SubResource("VisualShaderNodeFloatOp_own43")
nodes/fragment/11/position = Vector2(1360, 480)
nodes/fragment/connections = PackedInt32Array(2, 0, 3, 0, 3, 1, 4, 0, 6, 0, 7, 2, 7, 4, 8, 0, 5, 0, 8, 1, 8, 0, 0, 1, 9, 0, 10, 0, 4, 0, 11, 0, 10, 0, 11, 1, 11, 0, 5, 0)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_fasrq"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_oplhi"]
resource_local_to_scene = true
shader = SubResource("VisualShader_yot54")
shader = SubResource("VisualShader_fasrq")
[sub_resource type="Shader" id="Shader_oplhi"]
[sub_resource type="Shader" id="Shader_74px5"]
resource_local_to_scene = true
code = "shader_type canvas_item;
@ -257,15 +257,15 @@ void fragment() {
COLOR = color;
}"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_74px5"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_gmqhp"]
resource_local_to_scene = true
shader = SubResource("Shader_oplhi")
shader = SubResource("Shader_74px5")
shader_parameter/blink_color = Color(0, 0, 0, 1)
shader_parameter/blink_intensity = 0.0
shader_parameter/teleport_progress = 0.0
shader_parameter/scanline_density = 50.0
[sub_resource type="VisualShader" id="VisualShader_gmqhp"]
[sub_resource type="VisualShader" id="VisualShader_ksslq"]
resource_local_to_scene = true
code = "shader_type canvas_item;
render_mode blend_mix;
@ -347,9 +347,9 @@ nodes/fragment/11/node = SubResource("VisualShaderNodeFloatOp_own43")
nodes/fragment/11/position = Vector2(1360, 480)
nodes/fragment/connections = PackedInt32Array(2, 0, 3, 0, 3, 1, 4, 0, 6, 0, 7, 2, 7, 4, 8, 0, 5, 0, 8, 1, 8, 0, 0, 1, 9, 0, 10, 0, 4, 0, 11, 0, 10, 0, 11, 1, 11, 0, 5, 0)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ksslq"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_jn1m0"]
resource_local_to_scene = true
shader = SubResource("VisualShader_gmqhp")
shader = SubResource("VisualShader_ksslq")
[sub_resource type="Resource" id="Resource_hppa0"]
script = ExtResource("40_7qam0")
@ -414,7 +414,7 @@ ActivationType = 0
Targets = Array[NodePath]([NodePath("../Rumia")])
WaitForCompletion = true
[sub_resource type="Resource" id="Resource_jn1m0"]
[sub_resource type="Resource" id="Resource_usuub"]
resource_local_to_scene = true
script = ExtResource("49_0si7g")
Target = NodePath(".")
@ -570,13 +570,13 @@ position = Vector2(-779, -550)
[node name="HorizontalForceField" parent="Factory Tilemaps/Debug Room" instance=ExtResource("66_nxn3h")]
position = Vector2(-749, -496)
TurnOffMaterial = SubResource("ShaderMaterial_ji7au")
ActiveMaterial = SubResource("ShaderMaterial_fasrq")
TurnOffMaterial = SubResource("ShaderMaterial_yot54")
ActiveMaterial = SubResource("ShaderMaterial_oplhi")
[node name="HorizontalForceField2" parent="Factory Tilemaps/Debug Room" instance=ExtResource("66_nxn3h")]
position = Vector2(-735, -532)
TurnOffMaterial = SubResource("ShaderMaterial_74px5")
ActiveMaterial = SubResource("ShaderMaterial_ksslq")
TurnOffMaterial = SubResource("ShaderMaterial_gmqhp")
ActiveMaterial = SubResource("ShaderMaterial_jn1m0")
[node name="Part2" type="Node2D" parent="Factory Tilemaps"]
@ -945,7 +945,7 @@ Events = Array[Object]([SubResource("Resource_068l7"), SubResource("Resource_l3n
[node name="BossBattleStartScript" parent="Factory Tilemaps/LevelProps" instance=ExtResource("43_kf3qc")]
position = Vector2(-1487, -396)
Events = Array[Object]([SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy"), SubResource("Resource_jn1m0")])
Events = Array[Object]([SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy"), SubResource("Resource_usuub")])
[node name="Enemy13" parent="Factory Tilemaps/LevelProps" instance=ExtResource("47_u1ve6")]
position = Vector2(-1657, -788)

View file

@ -75,7 +75,7 @@ public partial class GlobalState : Node
// // Update current scene here too
// CurrentScene = GetTree().Root.GetChild(-1);
if (startData is not null)
if (startData is not null && GameManager.Instance is not null)
{
// Call deferred if it gives issues
DeferredAddStartDataToGameManager(startData);
@ -86,7 +86,7 @@ public partial class GlobalState : Node
private void DeferredAddStartDataToGameManager(MapStartDataResource resource)
{
GameManager.Instance.ApplyMapStartData(resource);
GameManager.Instance?.ApplyMapStartData(resource);
}
private ColorRect CreateFader()

View file

@ -58,6 +58,11 @@ public partial class IntroScenePlayer : CanvasLayer
public override void _Process(double delta)
{
if (Input.IsAnythingPressed())
{
Finished();
}
if (!_running) return;
_timer += delta;

View file

@ -21,7 +21,7 @@ Settings/temporaryLogLifetime=5.0
[application]
config/name="Cirno"
run/main_scene="res://Scenes/MainMenu.tscn"
run/main_scene="uid://oaxftu6lytvv"
config/features=PackedStringArray("4.4", "C#", "GL Compatibility")
config/icon="res://icon.svg"