aloe effect
This commit is contained in:
parent
de33b6bc15
commit
5a6eb151ae
7 changed files with 212 additions and 70 deletions
|
|
@ -869,7 +869,7 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="LeftUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"]
|
||||
position = Vector2(6, 4)
|
||||
scale = Vector2(0.999836, 0.999836)
|
||||
scale = Vector2(0.999835, 0.999835)
|
||||
rest = Transform2D(1, 0, 0, 1, 6, 4)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
|
|
@ -881,7 +881,7 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="LeftLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg"]
|
||||
position = Vector2(-1, 13)
|
||||
scale = Vector2(0.999834, 0.999834)
|
||||
scale = Vector2(0.999838, 0.999838)
|
||||
rest = Transform2D(1, 0, 0, 1, -1, 13)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
|
|
@ -893,7 +893,7 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="LeftFoot" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg"]
|
||||
position = Vector2(6, 10)
|
||||
scale = Vector2(0.999831, 0.999831)
|
||||
scale = Vector2(0.999832, 0.999832)
|
||||
rest = Transform2D(1, 0, 0, 1, 6, 10)
|
||||
auto_calculate_length_and_angle = false
|
||||
length = 12.0
|
||||
|
|
@ -914,7 +914,7 @@ editor_settings/show_bone_gizmo = false
|
|||
|
||||
[node name="RightUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"]
|
||||
position = Vector2(-14, -23)
|
||||
scale = Vector2(0.999828, 0.999828)
|
||||
scale = Vector2(0.999827, 0.999827)
|
||||
rest = Transform2D(1, 0, 0, 1, -14, -23)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
|
|
@ -926,13 +926,13 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="RightLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm"]
|
||||
position = Vector2(-2, 15)
|
||||
scale = Vector2(0.999824, 0.999824)
|
||||
scale = Vector2(0.999822, 0.999822)
|
||||
rest = Transform2D(1, 0, 0, 1, -2, 15)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
[node name="RightHand" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm"]
|
||||
position = Vector2(-1, 13)
|
||||
scale = Vector2(0.999829, 0.999829)
|
||||
scale = Vector2(0.99983, 0.99983)
|
||||
rest = Transform2D(1, 0, 0, 1, -1, 13)
|
||||
auto_calculate_length_and_angle = false
|
||||
length = 8.0
|
||||
|
|
@ -960,8 +960,8 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="Tie" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"]
|
||||
position = Vector2(-9, -21)
|
||||
rotation = 0.140731
|
||||
skew = -0.000234008
|
||||
rotation = -0.0699613
|
||||
skew = -0.000234127
|
||||
rest = Transform2D(1, 0, 0, 1, -9, -21)
|
||||
auto_calculate_length_and_angle = false
|
||||
length = 24.0
|
||||
|
|
@ -976,7 +976,7 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="Head" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"]
|
||||
position = Vector2(-10, -25)
|
||||
scale = Vector2(0.999826, 0.999826)
|
||||
scale = Vector2(0.999832, 0.999832)
|
||||
rest = Transform2D(1, 0, 0, 1, -10, -25)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
|
|
@ -1012,8 +1012,8 @@ offset = Vector2(-2, -2)
|
|||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Jaw" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"]
|
||||
position = Vector2(-3.00173, 2.99707)
|
||||
rotation = 0.0136575
|
||||
position = Vector2(-2.69782, 2.27068)
|
||||
rotation = -0.00688613
|
||||
scale = Vector2(0.99983, 0.99983)
|
||||
texture = SubResource("AtlasTexture_x5uj2")
|
||||
centered = false
|
||||
|
|
@ -1092,7 +1092,7 @@ shape = SubResource("CircleShape2D_67t4t")
|
|||
|
||||
[node name="LeftUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"]
|
||||
position = Vector2(-1, -20)
|
||||
scale = Vector2(0.999829, 0.999829)
|
||||
scale = Vector2(0.999825, 0.999825)
|
||||
rest = Transform2D(1, 0, 0, 1, -1, -20)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
|
|
@ -1114,8 +1114,8 @@ minTorque = -45.0
|
|||
maxTorque = 45.0
|
||||
|
||||
[node name="Left_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile"]
|
||||
rotation = 0.132318
|
||||
scale = Vector2(0.999998, 0.999998)
|
||||
rotation = 0.0380849
|
||||
scale = Vector2(1, 1)
|
||||
texture = SubResource("AtlasTexture_auqeq")
|
||||
centered = false
|
||||
offset = Vector2(-5, 0)
|
||||
|
|
@ -1123,8 +1123,8 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="Left_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm"]
|
||||
position = Vector2(-0.999829, 12.9978)
|
||||
rotation = -0.0583971
|
||||
scale = Vector2(0.999655, 0.999655)
|
||||
rotation = -0.126472
|
||||
scale = Vector2(0.999657, 0.999657)
|
||||
texture = SubResource("AtlasTexture_vlvtp")
|
||||
centered = false
|
||||
offset = Vector2(-4, -1)
|
||||
|
|
@ -1140,13 +1140,13 @@ _observedEntity = NodePath("../../../../../../../..")
|
|||
|
||||
[node name="LeftLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm"]
|
||||
position = Vector2(-2, 14)
|
||||
scale = Vector2(0.999828, 0.999828)
|
||||
scale = Vector2(0.99983, 0.99983)
|
||||
rest = Transform2D(1, 0, 0, 1, -2, 14)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
[node name="LeftHand" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm"]
|
||||
position = Vector2(-1, 13)
|
||||
scale = Vector2(0.999825, 0.999825)
|
||||
scale = Vector2(0.999827, 0.999827)
|
||||
rest = Transform2D(1, 0, 0, 1, -1, 13)
|
||||
auto_calculate_length_and_angle = false
|
||||
length = 6.0
|
||||
|
|
@ -1213,7 +1213,7 @@ entity = NodePath("..")
|
|||
[node name="Mover" type="Node" parent="."]
|
||||
script = ExtResource("18_tffdk")
|
||||
_speed = SubResource("Resource_v1iwd")
|
||||
_speedControlMult = 0.997214
|
||||
_speedControlMult = 1.94682
|
||||
|
||||
[node name="HitPlayer" type="Node" parent="."]
|
||||
script = ExtResource("19_k2y7k")
|
||||
|
|
|
|||
|
|
@ -929,7 +929,7 @@ metadata/_edit_lock_ = true
|
|||
[node name="RightUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"]
|
||||
use_parent_material = true
|
||||
position = Vector2(-6, 3)
|
||||
scale = Vector2(0.999829, 0.999829)
|
||||
scale = Vector2(0.99983, 0.99983)
|
||||
rest = Transform2D(1, 0, 0, 1, -6, 3)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
|
|
@ -970,7 +970,7 @@ metadata/_edit_lock_ = true
|
|||
[node name="LeftUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"]
|
||||
use_parent_material = true
|
||||
position = Vector2(6, 4)
|
||||
scale = Vector2(0.999824, 0.999824)
|
||||
scale = Vector2(0.999826, 0.999826)
|
||||
rest = Transform2D(1, 0, 0, 1, 6, 4)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
|
|
@ -994,7 +994,7 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="LeftFoot" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg"]
|
||||
position = Vector2(6, 10)
|
||||
scale = Vector2(0.99982, 0.99982)
|
||||
scale = Vector2(0.999821, 0.999821)
|
||||
rest = Transform2D(1, 0, 0, 1, 6, 10)
|
||||
auto_calculate_length_and_angle = false
|
||||
length = 12.0
|
||||
|
|
@ -1029,7 +1029,7 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="RightLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm"]
|
||||
position = Vector2(-2, 15)
|
||||
scale = Vector2(0.999814, 0.999814)
|
||||
scale = Vector2(0.999816, 0.999816)
|
||||
rest = Transform2D(1, 0, 0, 1, -2, 15)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
|
|
@ -1063,7 +1063,7 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="Tie" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"]
|
||||
position = Vector2(-9, -21)
|
||||
rotation = 0.0385608
|
||||
rotation = 0.00541537
|
||||
scale = Vector2(1e-05, 1e-05)
|
||||
skew = -0.000476122
|
||||
rest = Transform2D(1, 0, 0, 1, -9, -21)
|
||||
|
|
@ -1176,8 +1176,8 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="Jaw" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"]
|
||||
position = Vector2(-3, 3)
|
||||
rotation = -0.0627166
|
||||
scale = Vector2(0.999829, 0.999829)
|
||||
rotation = -0.00880774
|
||||
scale = Vector2(0.999828, 0.999828)
|
||||
texture = SubResource("AtlasTexture_7cvmi")
|
||||
centered = false
|
||||
offset = Vector2(-14, -2)
|
||||
|
|
@ -1194,7 +1194,7 @@ _observedEntity = NodePath("../../../../../../../..")
|
|||
|
||||
[node name="Jaw" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"]
|
||||
position = Vector2(-3, 3)
|
||||
scale = Vector2(0.999829, 0.999829)
|
||||
scale = Vector2(0.999828, 0.999828)
|
||||
rest = Transform2D(1, 0, 0, 1, -3, 3)
|
||||
auto_calculate_length_and_angle = false
|
||||
length = 11.0
|
||||
|
|
@ -1240,7 +1240,7 @@ remote_path = NodePath("../../HeadParticle/TrashcanLid/Trashcan_lid")
|
|||
|
||||
[node name="LeftUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"]
|
||||
position = Vector2(-1, -20)
|
||||
scale = Vector2(0.999824, 0.999824)
|
||||
scale = Vector2(0.999826, 0.999826)
|
||||
rest = Transform2D(1, 0, 0, 1, -1, -20)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
|
|
@ -1262,8 +1262,8 @@ minTorque = -45.0
|
|||
maxTorque = 45.0
|
||||
|
||||
[node name="Left_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile"]
|
||||
rotation = 0.034785
|
||||
scale = Vector2(0.999997, 0.999997)
|
||||
rotation = 0.0048851
|
||||
scale = Vector2(0.999996, 0.999996)
|
||||
texture = SubResource("AtlasTexture_auxav")
|
||||
centered = false
|
||||
offset = Vector2(-5, 0)
|
||||
|
|
@ -1288,7 +1288,7 @@ _observedEntity = NodePath("../../../../../../../..")
|
|||
|
||||
[node name="LeftLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm"]
|
||||
position = Vector2(-2, 14)
|
||||
scale = Vector2(0.999827, 0.999827)
|
||||
scale = Vector2(0.999826, 0.999826)
|
||||
rest = Transform2D(1, 0, 0, 1, -2, 14)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
|
|
|
|||
155
scenes/particles/aloe_effect.tscn
Normal file
155
scenes/particles/aloe_effect.tscn
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
[gd_scene load_steps=14 format=3 uid="uid://b3na62o5pu1gt"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://k60ylegy845j" path="res://assets/sprites/atlases/tile_animations.png" id="1_4r1tv"]
|
||||
[ext_resource type="Script" uid="uid://5ve2i0iu5oxr" path="res://scripts/particles/MixedParticles.cs" id="1_ftbe0"]
|
||||
[ext_resource type="Texture2D" uid="uid://c68mrfs4wb81x" path="res://assets/sprites/atlases/atlas2.png" id="2_mhmlv"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_mhmlv"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite2D/GPUParticles2D:emitting")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Sprite2D:self_modulate")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_4r1tv"]
|
||||
resource_name = "main"
|
||||
length = 1.33334
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.166667, 0.333333, 0.728266, 0.916667),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [0, 1, 2, 1, 0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite2D/GPUParticles2D:emitting")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.333333),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 1,
|
||||
"values": [false, true]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Sprite2D:self_modulate")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0.916667, 1.33333),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ftbe0"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_mhmlv"),
|
||||
&"main": SubResource("Animation_4r1tv")
|
||||
}
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_mhmlv"]
|
||||
atlas = ExtResource("1_4r1tv")
|
||||
region = Rect2(150, 0, 150, 50)
|
||||
filter_clip = true
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ftbe0"]
|
||||
atlas = ExtResource("2_mhmlv")
|
||||
region = Rect2(79, 102, 15, 15)
|
||||
|
||||
[sub_resource type="Curve" id="Curve_ftbe0"]
|
||||
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1e-05, 0), 0.0, 0.0, 0, 0, Vector2(0.152284, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 3
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_100so"]
|
||||
curve = SubResource("Curve_ftbe0")
|
||||
|
||||
[sub_resource type="Curve" id="Curve_q4bj6"]
|
||||
_data = [Vector2(0, 1), 0.0, -1.0, 0, 1, Vector2(1, 0), -1.0, 0.0, 1, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_dajq0"]
|
||||
curve = SubResource("Curve_q4bj6")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_100so"]
|
||||
particle_flag_disable_z = true
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 20.0
|
||||
direction = Vector3(0, -1, 0)
|
||||
spread = 0.0
|
||||
flatness = 1.0
|
||||
initial_velocity_min = 115.79
|
||||
initial_velocity_max = 115.79
|
||||
scale_curve = SubResource("CurveTexture_dajq0")
|
||||
alpha_curve = SubResource("CurveTexture_100so")
|
||||
|
||||
[node name="AloeEffect" type="Node2D" node_paths=PackedStringArray("emitter")]
|
||||
script = ExtResource("1_ftbe0")
|
||||
emitter = NodePath("Sprite2D/GPUParticles2D")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_ftbe0")
|
||||
}
|
||||
autoplay = "main"
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
z_index = -1
|
||||
z_as_relative = false
|
||||
position = Vector2(0, 22)
|
||||
texture = SubResource("AtlasTexture_mhmlv")
|
||||
offset = Vector2(0, -13.1)
|
||||
hframes = 3
|
||||
|
||||
[node name="GPUParticles2D" type="GPUParticles2D" parent="Sprite2D"]
|
||||
z_index = 50
|
||||
z_as_relative = false
|
||||
position = Vector2(0, -1)
|
||||
emitting = false
|
||||
texture = SubResource("AtlasTexture_ftbe0")
|
||||
one_shot = true
|
||||
explosiveness = 0.25
|
||||
fixed_fps = 60
|
||||
process_material = SubResource("ParticleProcessMaterial_100so")
|
||||
|
|
@ -8,6 +8,7 @@ public partial class AloeBehaviour : BaseBehaviour
|
|||
[Export] private float _hpTreshold = 0.25f;
|
||||
private Timer _timer;
|
||||
private bool _charge = true;
|
||||
private PackedScene particlesPacked = ResourceLoader.Load<PackedScene>("uid://b3na62o5pu1gt");
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
|
|
@ -37,6 +38,9 @@ public partial class AloeBehaviour : BaseBehaviour
|
|||
if (PoolContainer.Instance.TryGetEntity(checkPos, out RuntimePlantData plantData))
|
||||
{
|
||||
plantData.Heal(300, GetParent());
|
||||
var particles = particlesPacked.Instantiate<Node2D>();
|
||||
PoolContainer.Instance.Particles.AddChild(particles);
|
||||
particles.GlobalPosition = plantData.GlobalPosition;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,48 +15,18 @@ public partial class CYSFocusSetup : Node
|
|||
|
||||
Control control = grid.GetChild<Control>(i);
|
||||
|
||||
// If it isn't leftmost element
|
||||
if (x != 0)
|
||||
{
|
||||
control.FocusNeighborLeft = control.GetPathTo(grid.GetChild(PositionToIndex(x - 1, y)));
|
||||
}
|
||||
// If it isn't upmost element
|
||||
if (y != 0)
|
||||
{
|
||||
control.FocusNeighborTop = control.GetPathTo(grid.GetChild(PositionToIndex(x, y - 1)));
|
||||
}
|
||||
else
|
||||
if (y == 0)
|
||||
{
|
||||
control.FocusNeighborTop = control.GetPathTo(textContainer);
|
||||
}
|
||||
// If it isn't rightmost element
|
||||
if (x != grid.Columns - 1 && i != grid.GetChildCount())
|
||||
{
|
||||
control.FocusNeighborRight = control.GetPathTo(grid.GetChild(PositionToIndex(x + 1, y)));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (y != 0)
|
||||
{
|
||||
control.FocusNeighborRight = control.GetPathTo(grid.GetChild(PositionToIndex(x + 1, y - 1)));
|
||||
}
|
||||
else
|
||||
if (x == grid.Columns - 1)
|
||||
{
|
||||
control.FocusNeighborRight = control.GetPathTo(button);
|
||||
}
|
||||
}
|
||||
if (PositionToIndex(x, y + 1) < grid.GetChildCount())
|
||||
{
|
||||
control.FocusNeighborBottom = control.GetPathTo(grid.GetChild(PositionToIndex(x, y + 1)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
QueueFree();
|
||||
}
|
||||
private int PositionToIndex(int x, int y)
|
||||
{
|
||||
return y * grid.Columns + x;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
12
scripts/particles/MixedParticles.cs
Normal file
12
scripts/particles/MixedParticles.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using Godot;
|
||||
|
||||
namespace Newlon.Particles;
|
||||
|
||||
public partial class MixedParticles : Node2D
|
||||
{
|
||||
[Export] private GpuParticles2D emitter;
|
||||
public override void _Ready()
|
||||
{
|
||||
emitter.Finished += ()=> { QueueFree(); };
|
||||
}
|
||||
}
|
||||
1
scripts/particles/MixedParticles.cs.uid
Normal file
1
scripts/particles/MixedParticles.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://5ve2i0iu5oxr
|
||||
Loading…
Add table
Add a link
Reference in a new issue