mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-16 04:13:46 +00:00
Teleporters
This commit is contained in:
parent
e86e9a2bf7
commit
7db0e8f5b6
12 changed files with 215 additions and 19 deletions
|
|
@ -5,7 +5,7 @@ using Cirno.Scripts;
|
|||
|
||||
public partial class Activable : Node2D, IActivable
|
||||
{
|
||||
public virtual void Activate()
|
||||
public virtual void Activate(ActivationType activationType = ActivationType.Toggle)
|
||||
{
|
||||
//Debug.WriteLine("Activated");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://byms2dhliyux0"]
|
||||
[gd_scene load_steps=10 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"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_uk8yj"]
|
||||
size = Vector2(16, 16)
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_kwj8m"]
|
||||
radius = 4.12311
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ex07d"]
|
||||
atlas = ExtResource("2_ggtec")
|
||||
|
|
@ -40,13 +41,22 @@ animations = [{
|
|||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_we5sc"]
|
||||
particle_flag_disable_z = true
|
||||
emission_shape = 2
|
||||
emission_sphere_radius = 8.85
|
||||
orbit_velocity_min = -0.2
|
||||
orbit_velocity_max = 0.2
|
||||
gravity = Vector3(0, -98, 0)
|
||||
color = Color(0.207843, 0.360784, 1, 1)
|
||||
|
||||
[node name="Teleporter" type="Area2D"]
|
||||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
script = ExtResource("1_juavy")
|
||||
ParticleEmitTime = 0.8
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
shape = SubResource("RectangleShape2D_uk8yj")
|
||||
shape = SubResource("CircleShape2D_kwj8m")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("1_ppqan")
|
||||
|
|
@ -55,3 +65,11 @@ texture = ExtResource("1_ppqan")
|
|||
position = Vector2(0, -9)
|
||||
sprite_frames = SubResource("SpriteFrames_bt8wx")
|
||||
animation = &"Idle"
|
||||
|
||||
[node name="Particles" type="GPUParticles2D" parent="."]
|
||||
emitting = false
|
||||
amount = 50
|
||||
process_material = SubResource("ParticleProcessMaterial_we5sc")
|
||||
lifetime = 0.8
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue