14 lines
330 B
C#
14 lines
330 B
C#
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));
|
|
}
|
|
}
|