[Call of Duty noise] shotgun unlocked
This commit is contained in:
13
Scripts/ShotgunBullet.cs
Normal file
13
Scripts/ShotgunBullet.cs
Normal 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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user