[Call of Duty noise] shotgun unlocked

This commit is contained in:
2023-09-02 02:06:16 -07:00
parent de037da23b
commit 8d5ca74330
8 changed files with 109 additions and 14 deletions

13
Scripts/ShotgunBullet.cs Normal file
View File

@@ -0,0 +1,13 @@
using Godot;
using System.Linq;
public partial class ShotgunBullet : Projectile
{
public override void _PhysicsProcess(double delta)
{
var pellets = GetChildren().OfType<RigidBody3D>();
foreach (var pellet in pellets)
pellet.Translate(new Vector3(pellet.Rotation.Y, 0, Speed * -(float)delta));
}
}