mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Tutorial
This commit is contained in:
parent
8c3ed1f7c7
commit
b07a8fe60d
33 changed files with 594 additions and 58 deletions
|
|
@ -5,4 +5,7 @@
|
|||
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Scripts\Resources\Events\tsconfig.json" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
29
Dialogue/Characters/ICE.dch
Normal file
29
Dialogue/Characters/ICE.dch
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"@path": "res://addons/dialogic/Resources/character.gd",
|
||||
"@subpath": NodePath(""),
|
||||
"_translation_id": "",
|
||||
"color": Color(1, 1, 1, 1),
|
||||
"custom_info": {
|
||||
"sound_mood_default": "",
|
||||
"sound_moods": {},
|
||||
"style": ""
|
||||
},
|
||||
"default_portrait": "Default",
|
||||
"description": "",
|
||||
"display_name": "I.C.E.",
|
||||
"mirror": false,
|
||||
"nicknames": [""],
|
||||
"offset": Vector2(0, 0),
|
||||
"portraits": {
|
||||
"Default": {
|
||||
"export_overrides": {
|
||||
"image": "\"res://Sprites/Portraits/ICE.png\""
|
||||
},
|
||||
"mirror": false,
|
||||
"offset": Vector2(0, 0),
|
||||
"scale": 1,
|
||||
"scene": ""
|
||||
}
|
||||
},
|
||||
"scale": 1.0
|
||||
}
|
||||
|
|
@ -15,7 +15,8 @@
|
|||
script = ExtResource("1_5pbjb")
|
||||
scene = ExtResource("1_4vo3k")
|
||||
overrides = {
|
||||
"global_font_size": "15.0"
|
||||
"global_font": "\"res://fonts/at01.ttf\"",
|
||||
"global_font_size": "12.0"
|
||||
}
|
||||
|
||||
[sub_resource type="Resource" id="Resource_fuhfn"]
|
||||
|
|
@ -32,12 +33,10 @@ overrides = {}
|
|||
script = ExtResource("1_5pbjb")
|
||||
scene = ExtResource("4_m8ph6")
|
||||
overrides = {
|
||||
"box_distance": "4.0",
|
||||
"box_size": "Vector2(300, 60)",
|
||||
"box_distance": "0.0",
|
||||
"box_size": "Vector2(300, 80)",
|
||||
"name_label_custom_size": "9.0",
|
||||
"name_label_use_global_size": "false",
|
||||
"text_custom_size": "6.0",
|
||||
"text_use_global_size": "false"
|
||||
"text_custom_size": "6.0"
|
||||
}
|
||||
|
||||
[sub_resource type="Resource" id="Resource_cbrr4"]
|
||||
|
|
@ -76,4 +75,4 @@ layer_info = {
|
|||
}
|
||||
base_overrides = {}
|
||||
layers = Array[ExtResource("1_5pbjb")]([])
|
||||
metadata/_latest_layer = ""
|
||||
metadata/_latest_layer = "12"
|
||||
|
|
|
|||
6
Dialogue/Timelines/Tutorial/tutorial_barrels.dtl
Normal file
6
Dialogue/Timelines/Tutorial/tutorial_barrels.dtl
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
ICE: Many things can be destroyed\: boxes, barrels, furniture. Just shoot them!
|
||||
ICE: Be VERY careful whenever you approach one of these orange barrels\: they contain flammable fuel that will explode very easily.
|
||||
ICE: Explosions can destroy objects and cause other explosions, they are a very powerful tool to defeat your enemies and open paths in the environment.
|
||||
ICE: Also be careful\: the energy shield you have been issued protects you from most form of damage but it's unable to protect you from explosive and acid damage.
|
||||
ICE: These will go straight through your shield and hurt you directly, try to avoid standing close to barrels when they explode.
|
||||
ICE: If you get hurt try to stand on one of these white pads like the one behind you\: it's a health station and it will gradually recover your health and shields!
|
||||
10
Dialogue/Timelines/Tutorial/tutorial_cameras.dtl
Normal file
10
Dialogue/Timelines/Tutorial/tutorial_cameras.dtl
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
ICE: Do you see that device on the wall that turns back and forth? \
|
||||
That's a security camera.
|
||||
ICE: If you get spotted by one the alarm will sound and enemies will converge on your location and sometimes nasty traps may trigger.
|
||||
ICE: You can avoid getting spotted either by taking cover behind tall objects, you should avoid getting spotted as much as possible.
|
||||
Cirno: Can I just freeze them?
|
||||
ICE: Yes you can! They are very sensitive pieces of equipment so just shooting them will destroy them and no alarm will sound.
|
||||
ICE: When you enter a room the camera should always be your highest priority.
|
||||
ICE: If you get spotted and the alarm sounds, find an alarm box in order to disable it.
|
||||
They're these rectangular flashy red boxes you may sometimes find of walls. \
|
||||
Use one and the alarm goes away! Easy!
|
||||
8
Dialogue/Timelines/Tutorial/tutorial_gun.dtl
Normal file
8
Dialogue/Timelines/Tutorial/tutorial_gun.dtl
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
ICE: Here's your gun, pick it up by approaching it and pressing F or [something] when you see the marker around it.
|
||||
Cirno: I don't need a gun, I can use pretty strong magic!
|
||||
ICE: Perhaps in your original world, we ran some tests and it seems like using raw magic will tire you out really fast in this world, maybe because this world does not have natural magic, so the magic in your body is all you have.
|
||||
ICE: This gun was specifically made for you, it feeds on your internal magic and emits it in a very efficient way, you will never get tired when using this gun and the ammo will never run out!
|
||||
ICE: This will not be the case for other weapons you will find on the field, they WILL require ammunition of some kind.
|
||||
ICE: To shoot your gun, press Space on the keyboard or [something] on the controller.
|
||||
ICE: You can aim your gun with the right control stick or with the number pad, also keep in mind that by pressing SHIFT (or [something]) you will be able to strafe.
|
||||
ICE: Strafing is important\: it will allow you to keep your aim still, move more carefully and see your hitbox, try to avoid contact with enemy bullets!
|
||||
12
Dialogue/Timelines/Tutorial/tutorial_intro.dtl
Normal file
12
Dialogue/Timelines/Tutorial/tutorial_intro.dtl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
ICE: Welcome to the training course!\
|
||||
This is where you will learn the basics to be effective in your missions.
|
||||
Cirno: MY RIBBON IS TALKING TO ME?!?!
|
||||
ICE: Were you listening to the briefings? I'm I.C.E.\: an AI that was placed in your hair ribbon to help you with your mission.
|
||||
Cirno: So you're a really small person? That's really cool!
|
||||
ICE: Not really...\
|
||||
Let's put this aside for now and listen closely.
|
||||
ICE: This is a virtual training facility, you are actually sleeping in the real world while the computer is feeding you this simulation.
|
||||
ICE: It's a great tool to train quickly, you'll become an amazing fighter in no time!
|
||||
ICE: For now let's start with the very basics\: use WASD or the left control stick to move and approach the control pad on the northern wall.
|
||||
Cirno: Which direction is north again?
|
||||
ICE: UP! It's up.
|
||||
3
Dialogue/Timelines/Tutorial/tutorial_switch.dtl
Normal file
3
Dialogue/Timelines/Tutorial/tutorial_switch.dtl
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
ICE: Great! You made it to the switch.\
|
||||
You can press F on the keyboard or [something] on your gamepad to activate it.
|
||||
ICE: Switches come in many forms, they allow you to manipolate your environment by opening doors, triggering devices and such. Always be on the lookout for switches.
|
||||
1
Dialogue/Timelines/Tutorial/tutorial_teleporter_1.dtl
Normal file
1
Dialogue/Timelines/Tutorial/tutorial_teleporter_1.dtl
Normal file
|
|
@ -0,0 +1 @@
|
|||
ICE: That thing in front of you is a Telepad, try standing on it.
|
||||
5
Dialogue/Timelines/Tutorial/tutorial_teleporter_2.dtl
Normal file
5
Dialogue/Timelines/Tutorial/tutorial_teleporter_2.dtl
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Cirno: WHOAAA it was all tingly and swirly and suddenly I was somewhere else!
|
||||
ICE: Yes, that's a teleporter, if you step on one and it's active it will take you somewhere else.
|
||||
ICE: If the lights on its sides are blinking it means it's active and you can use it.\
|
||||
The destination telepad does not need to be active to teleport to it, sometimes they are one-way trips.
|
||||
ICE: You should be wary of telepads even if they are disabled, in case of alarm enemies may try to teleport to the telepad closest to you to try and catch you by surprise, never let your guard down!
|
||||
|
|
@ -146,7 +146,7 @@ metadata/_edit_group_ = true
|
|||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
modulate = Color(1, 1, 1, 0.784314)
|
||||
sprite_frames = SubResource("SpriteFrames_h2s1d")
|
||||
animation = &"Closed"
|
||||
animation = &"Open"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ size = Vector2(8, 48)
|
|||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_f2rl6"]
|
||||
size = Vector2(8, 48)
|
||||
|
||||
[node name="Area2D" type="Area2D" groups=["Solid"]]
|
||||
[node name="VerticalDoor" type="Area2D" groups=["Solid"]]
|
||||
collision_layer = 64
|
||||
collision_mask = 154
|
||||
script = ExtResource("1_e61bg")
|
||||
|
|
|
|||
13
Scenes/Interactable/ScriptableDisabledAlarmTrigger.tscn
Normal file
13
Scenes/Interactable/ScriptableDisabledAlarmTrigger.tscn
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://b0133vafvobxf"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Activables/ScriptableBase.cs" id="1_ggdoq"]
|
||||
[ext_resource type="Script" path="res://Scripts/Components/AlarmTrigger.cs" id="2_5wlne"]
|
||||
|
||||
[node name="ScriptableAlarmTrigger" type="Node2D"]
|
||||
script = ExtResource("1_ggdoq")
|
||||
Events = Array[Object]([])
|
||||
|
||||
[node name="AlarmTrigger" type="Node2D" parent="." node_paths=PackedStringArray("Target")]
|
||||
script = ExtResource("2_5wlne")
|
||||
TriggerType = 1
|
||||
Target = NodePath("..")
|
||||
12
Scenes/Interactable/ScriptableEnabledAlarmTrigger.tscn
Normal file
12
Scenes/Interactable/ScriptableEnabledAlarmTrigger.tscn
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://ca6befbx0nurt"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Activables/ScriptableBase.cs" id="1_kxf32"]
|
||||
[ext_resource type="Script" path="res://Scripts/Components/AlarmTrigger.cs" id="2_kl708"]
|
||||
|
||||
[node name="ScriptableEnabledAlarmTrigger" type="Node2D"]
|
||||
script = ExtResource("1_kxf32")
|
||||
Events = Array[Object]([])
|
||||
|
||||
[node name="AlarmTrigger" type="Node2D" parent="." node_paths=PackedStringArray("Target")]
|
||||
script = ExtResource("2_kl708")
|
||||
Target = NodePath("..")
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=11 format=3 uid="uid://d1h48wgasakk4"]
|
||||
[gd_scene load_steps=14 format=3 uid="uid://d1h48wgasakk4"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Activables/ScriptableBase.cs" id="1_2d4he"]
|
||||
[ext_resource type="PackedScene" uid="uid://crph24e6e0v0q" path="res://Scenes/Interactable/Control_Pad.tscn" id="2_2xddf"]
|
||||
|
|
@ -10,26 +10,41 @@
|
|||
script = ExtResource("2_umsjn")
|
||||
WaitForCompletion = true
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_uh6p2"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_enwfk"]
|
||||
atlas = ExtResource("2_slydm")
|
||||
region = Rect2(48, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8onhd"]
|
||||
atlas = ExtResource("2_slydm")
|
||||
region = Rect2(64, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_s6se2"]
|
||||
atlas = ExtResource("2_slydm")
|
||||
region = Rect2(80, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_t1vgp"]
|
||||
atlas = ExtResource("2_slydm")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wt4ye"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_srsfb"]
|
||||
atlas = ExtResource("2_slydm")
|
||||
region = Rect2(16, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ucweu"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ll0ki"]
|
||||
atlas = ExtResource("2_slydm")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
region = Rect2(32, 0, 16, 16)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_kbgi5"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_uh6p2")
|
||||
"texture": SubResource("AtlasTexture_enwfk")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wt4ye")
|
||||
"texture": SubResource("AtlasTexture_8onhd")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_s6se2")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"alarmed",
|
||||
|
|
@ -37,7 +52,13 @@ animations = [{
|
|||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ucweu")
|
||||
"texture": SubResource("AtlasTexture_t1vgp")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_srsfb")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ll0ki")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
|
|
@ -53,8 +74,8 @@ Target = NodePath("..")
|
|||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_kbgi5")
|
||||
animation = &"alarmed"
|
||||
frame_progress = 0.613245
|
||||
autoplay = "default"
|
||||
frame_progress = 0.890588
|
||||
|
||||
[node name="SpriteSwitcher" type="Node2D" parent="." node_paths=PackedStringArray("_sprite")]
|
||||
script = ExtResource("5_7g2v5")
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=80 format=4 uid="uid://bv451a8wgty4u"]
|
||||
[gd_scene load_steps=82 format=4 uid="uid://bv451a8wgty4u"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/GameManager.cs" id="1_8tmoj"]
|
||||
[ext_resource type="PackedScene" uid="uid://bghghp5ep4w2j" path="res://Scenes/player.tscn" id="2_8mh54"]
|
||||
|
|
@ -53,6 +53,7 @@
|
|||
[ext_resource type="PackedScene" uid="uid://r25rq6ijgm6m" path="res://Scenes/Items/Green_Keycard.tscn" id="36_f8fh1"]
|
||||
[ext_resource type="PackedScene" uid="uid://dnbtou2fklyvp" path="res://Scenes/Actors/alarm_sign.tscn" id="36_rd6f6"]
|
||||
[ext_resource type="PackedScene" uid="uid://c8lgk4wnyi1e6" path="res://Scenes/Actors/HealthStation.tscn" id="38_kuhg5"]
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/Events/AlarmDisableEvent.cs" id="40_7qam0"]
|
||||
[ext_resource type="Script" path="res://Scripts/Activables/ScriptableBase.cs" id="42_wigyb"]
|
||||
[ext_resource type="PackedScene" uid="uid://fxvlaidieiv7" path="res://Scenes/Interactable/ScriptableAreaTrigger.tscn" id="43_kf3qc"]
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/Events/MovePlayerEvent.cs" id="44_klwgh"]
|
||||
|
|
@ -72,6 +73,10 @@ script = ExtResource("7_l32kg")
|
|||
EggIndex = 0
|
||||
StartingEquipment = [ExtResource("6_khabp")]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_hppa0"]
|
||||
script = ExtResource("40_7qam0")
|
||||
WaitForCompletion = true
|
||||
|
||||
[sub_resource type="Resource" id="Resource_5er5x"]
|
||||
script = ExtResource("49_0si7g")
|
||||
Target = NodePath("../Factory Tilemaps/Teleporter")
|
||||
|
|
@ -131,7 +136,7 @@ ActivationType = 0
|
|||
Targets = Array[NodePath]([NodePath("../Rumia")])
|
||||
WaitForCompletion = true
|
||||
|
||||
[sub_resource type="Resource" id="Resource_l7eh7"]
|
||||
[sub_resource type="Resource" id="Resource_gr3ii"]
|
||||
resource_local_to_scene = true
|
||||
script = ExtResource("49_0si7g")
|
||||
Target = NodePath(".")
|
||||
|
|
@ -366,6 +371,7 @@ Target = NodePath("../HorizontalDoor")
|
|||
|
||||
[node name="AlarmBox" parent="Factory Tilemaps" instance=ExtResource("17_dppcs")]
|
||||
position = Vector2(-713, -153)
|
||||
Events = Array[Object]([SubResource("Resource_hppa0")])
|
||||
|
||||
[node name="Turret" parent="Factory Tilemaps" instance=ExtResource("18_6y85f")]
|
||||
position = Vector2(-1076, 125)
|
||||
|
|
@ -526,9 +532,11 @@ Target = NodePath("../Factory Tilemaps/HorizontalDoor4")
|
|||
|
||||
[node name="AlarmBox" parent="." instance=ExtResource("17_dppcs")]
|
||||
position = Vector2(-1174, 133)
|
||||
Events = Array[Object]([SubResource("Resource_hppa0")])
|
||||
|
||||
[node name="AlarmBox2" parent="." instance=ExtResource("17_dppcs")]
|
||||
position = Vector2(-1506, -188)
|
||||
Events = Array[Object]([SubResource("Resource_hppa0")])
|
||||
|
||||
[node name="LevelStartTrigger" parent="." instance=ExtResource("43_kf3qc")]
|
||||
position = Vector2(-808, -167)
|
||||
|
|
@ -620,7 +628,7 @@ Events = Array[Object]([SubResource("Resource_068l7"), SubResource("Resource_l3n
|
|||
|
||||
[node name="BossBattleStartScript" parent="." 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_l7eh7")])
|
||||
Events = Array[Object]([SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy"), SubResource("Resource_gr3ii")])
|
||||
|
||||
[node name="Enemy8" parent="." instance=ExtResource("47_u1ve6")]
|
||||
position = Vector2(-968, 206)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ namespace Cirno.Scripts;
|
|||
|
||||
public partial class AlarmManager : Node2D
|
||||
{
|
||||
public static AlarmManager Instance { get; private set; }
|
||||
|
||||
public bool IsAlarmOn { get; private set; } = false;
|
||||
|
||||
public Vector2 LastAlarmPosition { get; private set; } = new Vector2();
|
||||
|
|
@ -14,6 +16,11 @@ public partial class AlarmManager : Node2D
|
|||
[Signal]
|
||||
public delegate void AlarmDisabledEventHandler();
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
public void SoundAlarm(Vector2 location)
|
||||
{
|
||||
if (IsAlarmOn) return;
|
||||
|
|
|
|||
52
Scripts/Components/AlarmTrigger.cs
Normal file
52
Scripts/Components/AlarmTrigger.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Components;
|
||||
|
||||
public partial class AlarmTrigger : Node2D
|
||||
{
|
||||
private AlarmManager _alarmManager;
|
||||
|
||||
[Export]
|
||||
public AlarmTriggerType TriggerType { get; private set; }
|
||||
|
||||
[Export]
|
||||
public Node2D Target { get; private set; }
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_alarmManager = this.GetAlarmManager(); //AlarmManager.Instance;
|
||||
if (TriggerType is AlarmTriggerType.OnEnabled)
|
||||
{
|
||||
_alarmManager.AlarmEnabled += AlarmManagerOnAlarmEnabled;
|
||||
}
|
||||
else
|
||||
{
|
||||
_alarmManager.AlarmDisabled += AlarmManagerOnAlarmDisabled;
|
||||
}
|
||||
}
|
||||
|
||||
private void AlarmManagerOnAlarmDisabled()
|
||||
{
|
||||
Activate();
|
||||
}
|
||||
|
||||
private void AlarmManagerOnAlarmEnabled(Vector2 location)
|
||||
{
|
||||
Activate();
|
||||
}
|
||||
|
||||
private void Activate()
|
||||
{
|
||||
if (Target is IActivable activatable)
|
||||
{
|
||||
activatable.Activate();
|
||||
}
|
||||
}
|
||||
|
||||
public enum AlarmTriggerType
|
||||
{
|
||||
OnEnabled,
|
||||
OnDisabled
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -45,6 +45,13 @@ public partial class Door : Activable
|
|||
//_solidShape.Disabled = false;
|
||||
}
|
||||
|
||||
public void Destroy()
|
||||
{
|
||||
_animatedSprite.Play("Destroyed");
|
||||
State = DoorState.Destroyed;
|
||||
CallDeferred(MethodName.DeferredDisableCollision, true);
|
||||
}
|
||||
|
||||
private void DeferredDisableCollision(bool state)
|
||||
{
|
||||
_collisionShape.Disabled = state;
|
||||
|
|
@ -56,30 +63,44 @@ public partial class Door : Activable
|
|||
switch (activationType)
|
||||
{
|
||||
case ActivationType.Toggle:
|
||||
switch (State)
|
||||
{
|
||||
case DoorState.Closed:
|
||||
Open();
|
||||
break;
|
||||
case DoorState.Open:
|
||||
Close();
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
ToggleDoor();
|
||||
break;
|
||||
case ActivationType.Enable:
|
||||
Open();
|
||||
break;
|
||||
case ActivationType.Disable:
|
||||
Close();
|
||||
break;
|
||||
case ActivationType.Disable:
|
||||
Open();
|
||||
break;
|
||||
case ActivationType.Use:
|
||||
ToggleDoor();
|
||||
break;
|
||||
case ActivationType.Destroy:
|
||||
Destroy();
|
||||
break;
|
||||
case ActivationType.Open:
|
||||
Open();
|
||||
break;
|
||||
case ActivationType.Close:
|
||||
Close();
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(activationType), activationType, null);
|
||||
ToggleDoor();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleDoor()
|
||||
{
|
||||
switch (State)
|
||||
{
|
||||
case DoorState.Closed:
|
||||
Open();
|
||||
break;
|
||||
case DoorState.Open:
|
||||
Close();
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -93,6 +114,9 @@ public partial class Door : Activable
|
|||
case DoorState.Open:
|
||||
Open();
|
||||
break;
|
||||
case DoorState.Destroyed:
|
||||
Destroy();
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
|
@ -117,5 +141,6 @@ public partial class Door : Activable
|
|||
public enum DoorState
|
||||
{
|
||||
Closed,
|
||||
Open
|
||||
Open,
|
||||
Destroyed
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,11 +195,17 @@ public partial class GameManager : Node2D
|
|||
CameraTargetObject(_player);
|
||||
}
|
||||
|
||||
public void CameraTargetObject(Node2D target)
|
||||
public void CameraTargetObject(Node2D target, Vector2? offset = null)
|
||||
{
|
||||
if (_cameraTarget is null) return;
|
||||
_cameraTarget.Reparent(target, true);
|
||||
_cameraTarget.GlobalPosition = target.GlobalPosition;
|
||||
|
||||
if (offset.HasValue)
|
||||
{
|
||||
_cameraTarget.Position += offset.Value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void SpawnWeapons()
|
||||
|
|
|
|||
|
|
@ -11,5 +11,7 @@ public enum ActivationType
|
|||
Enable,
|
||||
Disable,
|
||||
Use,
|
||||
Destroy
|
||||
Destroy,
|
||||
Open,
|
||||
Close
|
||||
}
|
||||
21
Scripts/Resources/Events/CameraTargetEvent.cs
Normal file
21
Scripts/Resources/Events/CameraTargetEvent.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Resources.Events;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class CameraTargetEvent : CameraTargetPlayerEvent
|
||||
{
|
||||
[Export]
|
||||
public NodePath Target { get; private set; }
|
||||
|
||||
[Export]
|
||||
public Vector2 Offset { get; private set; }
|
||||
|
||||
public override void Start(Node2D parent)
|
||||
{
|
||||
GameManager.Instance.CameraTargetObject(parent.GetNode<Node2D>(Target), Offset);
|
||||
_isComplete = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
30
Scripts/Resources/Events/CameraTargetPlayerEvent.cs
Normal file
30
Scripts/Resources/Events/CameraTargetPlayerEvent.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Resources.Events;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class CameraTargetPlayerEvent : EventResource
|
||||
{
|
||||
protected bool _isComplete = false;
|
||||
|
||||
public override void Init(Node2D parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void Start(Node2D parent)
|
||||
{
|
||||
GameManager.Instance.CameraTargetPlayer();
|
||||
_isComplete = true;
|
||||
}
|
||||
|
||||
public override void UpdateEvent(double delta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override bool IsComplete()
|
||||
{
|
||||
return _isComplete;
|
||||
}
|
||||
}
|
||||
38
Scripts/Resources/Events/WaitEvent.cs
Normal file
38
Scripts/Resources/Events/WaitEvent.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System.Threading.Tasks;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Resources.Events;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class WaitEvent : EventResource
|
||||
{
|
||||
[Export(PropertyHint.None, "suffix:s")]
|
||||
public float WaitTime { get; set; }
|
||||
protected bool _isComplete = false;
|
||||
|
||||
public override void Init(Node2D parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void Start(Node2D parent)
|
||||
{
|
||||
_ = Wait();
|
||||
}
|
||||
|
||||
private async Task Wait()
|
||||
{
|
||||
await Task.Delay((int)(WaitTime)*1000);
|
||||
_isComplete = true;
|
||||
}
|
||||
|
||||
public override void UpdateEvent(double delta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override bool IsComplete()
|
||||
{
|
||||
return _isComplete;
|
||||
}
|
||||
}
|
||||
10
Scripts/Resources/Events/tsconfig.json
Normal file
10
Scripts/Resources/Events/tsconfig.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2016",
|
||||
"module": "commonjs",
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
||||
BIN
Sprites/AlarmBox.aseprite
(Stored with Git LFS)
BIN
Sprites/AlarmBox.aseprite
(Stored with Git LFS)
Binary file not shown.
BIN
Sprites/AlarmBox.png
(Stored with Git LFS)
BIN
Sprites/AlarmBox.png
(Stored with Git LFS)
Binary file not shown.
BIN
Sprites/Portraits/ICE.png
(Stored with Git LFS)
Normal file
BIN
Sprites/Portraits/ICE.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Sprites/Portraits/ICE.png.import
Normal file
34
Sprites/Portraits/ICE.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://kovtxdmpdi4m"
|
||||
path="res://.godot/imported/ICE.png-9029e438221e73c74298ad9d20934055.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/Portraits/ICE.png"
|
||||
dest_files=["res://.godot/imported/ICE.png-9029e438221e73c74298ad9d20934055.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
BIN
Tilesets/factory.aseprite
(Stored with Git LFS)
BIN
Tilesets/factory.aseprite
(Stored with Git LFS)
Binary file not shown.
BIN
Tilesets/factory.png
(Stored with Git LFS)
BIN
Tilesets/factory.png
(Stored with Git LFS)
Binary file not shown.
|
|
@ -36,6 +36,7 @@ GlobalState="*res://Scripts/GlobalState.cs"
|
|||
|
||||
directories/dch_directory={
|
||||
"Cirno": "res://Dialogue/Characters/Cirno.dch",
|
||||
"ICE": "res://Dialogue/Characters/ICE.dch",
|
||||
"Navigator": "res://Dialogue/Characters/Navigator.dch",
|
||||
"Rumia": "res://Dialogue/Characters/Rumia.dch",
|
||||
"computer": "res://Dialogue/Characters/computer.dch"
|
||||
|
|
@ -49,7 +50,14 @@ directories/dtl_directory={
|
|||
"rumia_defeat": "res://Dialogue/Timelines/rumia_defeat.dtl",
|
||||
"rumia_rebel_base_1": "res://Dialogue/Timelines/rumia_rebel_base_1.dtl",
|
||||
"testintro": "res://Dialogue/Timelines/testintro.dtl",
|
||||
"timeline": "res://Dialogue/timeline.dtl"
|
||||
"timeline": "res://Dialogue/timeline.dtl",
|
||||
"tutorial_barrels": "res://Dialogue/Timelines/Tutorial/tutorial_barrels.dtl",
|
||||
"tutorial_cameras": "res://Dialogue/Timelines/Tutorial/tutorial_cameras.dtl",
|
||||
"tutorial_gun": "res://Dialogue/Timelines/Tutorial/tutorial_gun.dtl",
|
||||
"tutorial_intro": "res://Dialogue/Timelines/Tutorial/tutorial_intro.dtl",
|
||||
"tutorial_switch": "res://Dialogue/Timelines/Tutorial/tutorial_switch.dtl",
|
||||
"tutorial_teleporter_1": "res://Dialogue/Timelines/Tutorial/tutorial_teleporter_1.dtl",
|
||||
"tutorial_teleporter_2": "res://Dialogue/Timelines/Tutorial/tutorial_teleporter_2.dtl"
|
||||
}
|
||||
glossary/default_case_sensitive=true
|
||||
layout/style_list=["res://Dialogue/Styles/Textbox_style.tres", "res://Dialogue/Styles/VN.tres", "res://Dialogue/Styles/Computer_Style.tres", "res://Dialogue/Styles/Intro_Syle.tres", "res://Dialogue/Styles/custom_test.tres"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue