mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-21 00:43:48 +00:00
Remade spawn coordinates system
This commit is contained in:
parent
3681614196
commit
d633618633
5 changed files with 85 additions and 12 deletions
|
|
@ -40,7 +40,7 @@ public partial class Barrel : Area2D, IDestructible
|
|||
|
||||
private void CreateDebris()
|
||||
{
|
||||
this.CreateChild<Barrel>(DebrisScene);
|
||||
this.CreateSibling<Barrel>(DebrisScene);
|
||||
|
||||
// if (DebrisScene == null) return;
|
||||
// var debris = DebrisScene.Instantiate<Barrel>();
|
||||
|
|
@ -55,7 +55,7 @@ public partial class Barrel : Area2D, IDestructible
|
|||
GD.PushWarning("Object has no particles associated");
|
||||
return;
|
||||
}
|
||||
var particle = this.CreateChild<GpuParticles2D>(ExplosionParticles);
|
||||
var particle = this.CreateSibling<GpuParticles2D>(ExplosionParticles);
|
||||
if (particle == null) return;
|
||||
|
||||
particle.Emitting = true;
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ position = Vector2(0, 1)
|
|||
shape = SubResource("RectangleShape2D_ai4rh")
|
||||
|
||||
[node name="Muzzle" type="Marker2D" parent="."]
|
||||
position = Vector2(5, 0)
|
||||
position = Vector2(-1, 0)
|
||||
|
||||
[node name="Node2D" type="Node2D" parent="."]
|
||||
|
||||
|
|
@ -201,8 +201,9 @@ collision_mask = 128
|
|||
shape = SubResource("CircleShape2D_e6woi")
|
||||
debug_color = Color(1, 0.00817797, 0.0443347, 0.42)
|
||||
|
||||
[node name="Weapon" parent="." instance=ExtResource("9_wblq0")]
|
||||
[node name="Weapon" parent="." node_paths=PackedStringArray("Muzzle") instance=ExtResource("9_wblq0")]
|
||||
BulletScene = ExtResource("2_ov36d")
|
||||
Muzzle = NodePath("../Muzzle")
|
||||
RateOfFire = 0.1
|
||||
BulletCapacity = 100
|
||||
ReloadTime = 0.4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue