diff options
| author | alex <[email protected]> | 2026-08-08 03:57:01 +0200 |
|---|---|---|
| committer | alex <[email protected]> | 2026-08-08 03:57:01 +0200 |
| commit | 0c5df1e068ff8865545b7e1b3629377089c8b965 (patch) | |
| tree | 67849c9148a238702f89efb11f95893a162560fd /Weapon.cs | |
| parent | a6e7c49a162ada8ec0883fccb1da7313b03ba2ec (diff) | |
| download | godot-testing-0c5df1e068ff8865545b7e1b3629377089c8b965.tar.xz godot-testing-0c5df1e068ff8865545b7e1b3629377089c8b965.zip | |
zabdol som ze co
Diffstat (limited to 'Weapon.cs')
| -rw-r--r-- | Weapon.cs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -3,7 +3,8 @@ using Godot; public partial class Weapon : Node2D { [Export] public PackedScene BulletScene { get; set; } - + [Export] public bool PierceEntity { get; set; } = false; + [Export] public bool PierceTerrain { get; set; } = false; // Future-proofing: Different weapons can have different damage multipliers! [Export] public float DamageMultiplier { get; set; } = 1.0f; public override void _Process(double delta) @@ -32,6 +33,8 @@ public partial class Weapon : Node2D bullet.GlobalPosition = GlobalPosition; // Spawns right where the weapon node is! bullet.Direction = Vector2.Right.Rotated(GlobalRotation); bullet.Damage = finalDamage; + bullet.PierceEntity = PierceEntity; + bullet.PierceTerrain = PierceTerrain; // 4. Add it to the world GetTree().Root.AddChild(bullet); |
