mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-21 13:23:47 +00:00
Teleporter animation
This commit is contained in:
parent
eb1d74ee63
commit
50c111ee28
10 changed files with 111 additions and 52 deletions
4
Dialogue/Timelines/computer2.dtl
Normal file
4
Dialogue/Timelines/computer2.dtl
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
computer: To all security personnel\: there is an intruder in the facility, the intruder looks like a blonde little girl wearing dark clothes and a red ribbon, despite the apparences she's capable of generating highly dangerous projectiles capable of a high degree of destruction.
|
||||||
|
computer: It is advised to keep the distance from the subject and immediately notify security on sight. She's been recorded on camera while devouring human personnel. The subject is currently sealed in storage A while we wait for reinforcements, do not open the storage for any reason.
|
||||||
|
Cirno: Huh, that sounds like somebody I know
|
||||||
|
Navigator: Could it be somebody from your world?
|
||||||
64
Resources/Sprites/teleporter.tres
Normal file
64
Resources/Sprites/teleporter.tres
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
[gd_resource type="SpriteFrames" load_steps=9 format=3 uid="uid://w4jlaryen3we"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://d3e762pxublbt" path="res://Sprites/teleporter.png" id="1_mbwvp"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dcrsv00yf6ylk" path="res://Sprites/Teleport_Particles.png" id="2_1w0f8"]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_bxges"]
|
||||||
|
atlas = ExtResource("1_mbwvp")
|
||||||
|
region = Rect2(16, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ylf6g"]
|
||||||
|
atlas = ExtResource("1_mbwvp")
|
||||||
|
region = Rect2(32, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_5fbjm"]
|
||||||
|
atlas = ExtResource("1_mbwvp")
|
||||||
|
region = Rect2(0, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ex07d"]
|
||||||
|
atlas = ExtResource("2_1w0f8")
|
||||||
|
region = Rect2(0, 0, 16, 32)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_1jqq2"]
|
||||||
|
atlas = ExtResource("2_1w0f8")
|
||||||
|
region = Rect2(16, 0, 16, 32)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_wbhur"]
|
||||||
|
atlas = ExtResource("2_1w0f8")
|
||||||
|
region = Rect2(32, 0, 16, 32)
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
animations = [{
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_bxges")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_ylf6g")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"Active",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_5fbjm")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"Default",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_ex07d")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_1jqq2")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_wbhur")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"Teleporting",
|
||||||
|
"speed": 5.0
|
||||||
|
}]
|
||||||
|
|
@ -1,46 +1,11 @@
|
||||||
[gd_scene load_steps=10 format=3 uid="uid://byms2dhliyux0"]
|
[gd_scene load_steps=5 format=3 uid="uid://byms2dhliyux0"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://Scripts/Activables/Teleporter.cs" id="1_juavy"]
|
[ext_resource type="Script" path="res://Scripts/Activables/Teleporter.cs" id="1_juavy"]
|
||||||
[ext_resource type="Texture2D" uid="uid://d3e762pxublbt" path="res://Sprites/teleporter.png" id="1_ppqan"]
|
[ext_resource type="SpriteFrames" uid="uid://w4jlaryen3we" path="res://Resources/Sprites/teleporter.tres" id="2_k58t7"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dcrsv00yf6ylk" path="res://Sprites/Teleport_Particles.png" id="2_ggtec"]
|
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_kwj8m"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_kwj8m"]
|
||||||
radius = 4.12311
|
radius = 4.12311
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ex07d"]
|
|
||||||
atlas = ExtResource("2_ggtec")
|
|
||||||
region = Rect2(0, 0, 16, 32)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1jqq2"]
|
|
||||||
atlas = ExtResource("2_ggtec")
|
|
||||||
region = Rect2(16, 0, 16, 32)
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wbhur"]
|
|
||||||
atlas = ExtResource("2_ggtec")
|
|
||||||
region = Rect2(32, 0, 16, 32)
|
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id="SpriteFrames_bt8wx"]
|
|
||||||
animations = [{
|
|
||||||
"frames": [],
|
|
||||||
"loop": true,
|
|
||||||
"name": &"Idle",
|
|
||||||
"speed": 5.0
|
|
||||||
}, {
|
|
||||||
"frames": [{
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_ex07d")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_1jqq2")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": SubResource("AtlasTexture_wbhur")
|
|
||||||
}],
|
|
||||||
"loop": true,
|
|
||||||
"name": &"Teleporting",
|
|
||||||
"speed": 5.0
|
|
||||||
}]
|
|
||||||
|
|
||||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_we5sc"]
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_we5sc"]
|
||||||
particle_flag_disable_z = true
|
particle_flag_disable_z = true
|
||||||
emission_shape = 2
|
emission_shape = 2
|
||||||
|
|
@ -58,13 +23,11 @@ ParticleEmitTime = 0.8
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
shape = SubResource("CircleShape2D_kwj8m")
|
shape = SubResource("CircleShape2D_kwj8m")
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
[node name="ParticleSprite" type="AnimatedSprite2D" parent="."]
|
||||||
texture = ExtResource("1_ppqan")
|
visible = false
|
||||||
|
|
||||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
|
||||||
position = Vector2(0, -9)
|
position = Vector2(0, -9)
|
||||||
sprite_frames = SubResource("SpriteFrames_bt8wx")
|
sprite_frames = ExtResource("2_k58t7")
|
||||||
animation = &"Idle"
|
animation = &"Teleporting"
|
||||||
|
|
||||||
[node name="Particles" type="GPUParticles2D" parent="."]
|
[node name="Particles" type="GPUParticles2D" parent="."]
|
||||||
emitting = false
|
emitting = false
|
||||||
|
|
@ -72,4 +35,9 @@ amount = 50
|
||||||
process_material = SubResource("ParticleProcessMaterial_we5sc")
|
process_material = SubResource("ParticleProcessMaterial_we5sc")
|
||||||
lifetime = 0.8
|
lifetime = 0.8
|
||||||
|
|
||||||
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||||
|
sprite_frames = ExtResource("2_k58t7")
|
||||||
|
animation = &"Default"
|
||||||
|
frame_progress = 0.580599
|
||||||
|
|
||||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -23,6 +23,8 @@ public partial class Teleporter : Activable
|
||||||
|
|
||||||
private double _particleTimer;
|
private double _particleTimer;
|
||||||
|
|
||||||
|
private AnimatedSprite2D _animatedSprite;
|
||||||
|
|
||||||
// [Export]
|
// [Export]
|
||||||
// public GpuParticles2D Particles { get; set; }
|
// public GpuParticles2D Particles { get; set; }
|
||||||
|
|
||||||
|
|
@ -31,10 +33,20 @@ public partial class Teleporter : Activable
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
_particles = GetNode<GpuParticles2D>("./Particles");
|
_particles = GetNode<GpuParticles2D>("./Particles");
|
||||||
|
_animatedSprite = GetNode<AnimatedSprite2D>("AnimatedSprite2D");
|
||||||
|
|
||||||
IsPrimed = true;
|
IsPrimed = true;
|
||||||
_particles.Emitting = false;
|
_particles.Emitting = false;
|
||||||
_particleTimer = 0;
|
_particleTimer = 0;
|
||||||
|
|
||||||
|
if (IsEnabled)
|
||||||
|
{
|
||||||
|
_animatedSprite.Play("Active");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_animatedSprite.Play("Default");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void _Process(double delta)
|
public override void _Process(double delta)
|
||||||
|
|
@ -60,9 +72,11 @@ public partial class Teleporter : Activable
|
||||||
case ActivationType.Enable:
|
case ActivationType.Enable:
|
||||||
// Enables Teleporter
|
// Enables Teleporter
|
||||||
IsEnabled = true;
|
IsEnabled = true;
|
||||||
|
_animatedSprite.Play("Active");
|
||||||
break;
|
break;
|
||||||
case ActivationType.Disable:
|
case ActivationType.Disable:
|
||||||
IsEnabled = false;
|
IsEnabled = false;
|
||||||
|
_animatedSprite.Play("Default");
|
||||||
// Disables Teleporter
|
// Disables Teleporter
|
||||||
break;
|
break;
|
||||||
case ActivationType.Use:
|
case ActivationType.Use:
|
||||||
|
|
|
||||||
BIN
Sprites/Portraits/Cirno.aseprite
(Stored with Git LFS)
BIN
Sprites/Portraits/Cirno.aseprite
(Stored with Git LFS)
Binary file not shown.
BIN
Sprites/Portraits/Cirno.png
(Stored with Git LFS)
BIN
Sprites/Portraits/Cirno.png
(Stored with Git LFS)
Binary file not shown.
BIN
Sprites/teleporter.aseprite
(Stored with Git LFS)
BIN
Sprites/teleporter.aseprite
(Stored with Git LFS)
Binary file not shown.
BIN
Sprites/teleporter.png
(Stored with Git LFS)
BIN
Sprites/teleporter.png
(Stored with Git LFS)
Binary file not shown.
|
|
@ -42,6 +42,7 @@ directories/dch_directory={
|
||||||
directories/dtl_directory={
|
directories/dtl_directory={
|
||||||
"Rumia_Intro": "res://Dialogue/Timelines/Rumia_Intro.dtl",
|
"Rumia_Intro": "res://Dialogue/Timelines/Rumia_Intro.dtl",
|
||||||
"computer1": "res://Dialogue/Timelines/computer1.dtl",
|
"computer1": "res://Dialogue/Timelines/computer1.dtl",
|
||||||
|
"computer2": "res://Dialogue/Timelines/computer2.dtl",
|
||||||
"testintro": "res://Dialogue/Timelines/testintro.dtl",
|
"testintro": "res://Dialogue/Timelines/testintro.dtl",
|
||||||
"timeline": "res://Dialogue/timeline.dtl"
|
"timeline": "res://Dialogue/timeline.dtl"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue