Teleporter animation

This commit is contained in:
Marco 2025-02-07 15:43:02 +01:00
commit 50c111ee28
10 changed files with 111 additions and 52 deletions

View 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?

View 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
}]

View file

@ -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="Texture2D" uid="uid://d3e762pxublbt" path="res://Sprites/teleporter.png" id="1_ppqan"]
[ext_resource type="Texture2D" uid="uid://dcrsv00yf6ylk" path="res://Sprites/Teleport_Particles.png" id="2_ggtec"]
[ext_resource type="SpriteFrames" uid="uid://w4jlaryen3we" path="res://Resources/Sprites/teleporter.tres" id="2_k58t7"]
[sub_resource type="CircleShape2D" id="CircleShape2D_kwj8m"]
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"]
particle_flag_disable_z = true
emission_shape = 2
@ -58,13 +23,11 @@ ParticleEmitTime = 0.8
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_kwj8m")
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("1_ppqan")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
[node name="ParticleSprite" type="AnimatedSprite2D" parent="."]
visible = false
position = Vector2(0, -9)
sprite_frames = SubResource("SpriteFrames_bt8wx")
animation = &"Idle"
sprite_frames = ExtResource("2_k58t7")
animation = &"Teleporting"
[node name="Particles" type="GPUParticles2D" parent="."]
emitting = false
@ -72,4 +35,9 @@ amount = 50
process_material = SubResource("ParticleProcessMaterial_we5sc")
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"]

File diff suppressed because one or more lines are too long

View file

@ -23,6 +23,8 @@ public partial class Teleporter : Activable
private double _particleTimer;
private AnimatedSprite2D _animatedSprite;
// [Export]
// public GpuParticles2D Particles { get; set; }
@ -31,10 +33,20 @@ public partial class Teleporter : Activable
public override void _Ready()
{
_particles = GetNode<GpuParticles2D>("./Particles");
_animatedSprite = GetNode<AnimatedSprite2D>("AnimatedSprite2D");
IsPrimed = true;
_particles.Emitting = false;
_particleTimer = 0;
if (IsEnabled)
{
_animatedSprite.Play("Active");
}
else
{
_animatedSprite.Play("Default");
}
}
public override void _Process(double delta)
@ -60,9 +72,11 @@ public partial class Teleporter : Activable
case ActivationType.Enable:
// Enables Teleporter
IsEnabled = true;
_animatedSprite.Play("Active");
break;
case ActivationType.Disable:
IsEnabled = false;
_animatedSprite.Play("Default");
// Disables Teleporter
break;
case ActivationType.Use:

BIN
Sprites/Portraits/Cirno.aseprite (Stored with Git LFS)

Binary file not shown.

BIN
Sprites/Portraits/Cirno.png (Stored with Git LFS)

Binary file not shown.

BIN
Sprites/teleporter.aseprite (Stored with Git LFS)

Binary file not shown.

BIN
Sprites/teleporter.png (Stored with Git LFS)

Binary file not shown.

View file

@ -42,6 +42,7 @@ directories/dch_directory={
directories/dtl_directory={
"Rumia_Intro": "res://Dialogue/Timelines/Rumia_Intro.dtl",
"computer1": "res://Dialogue/Timelines/computer1.dtl",
"computer2": "res://Dialogue/Timelines/computer2.dtl",
"testintro": "res://Dialogue/Timelines/testintro.dtl",
"timeline": "res://Dialogue/timeline.dtl"
}