Beeg checkin

This commit is contained in:
2023-09-06 03:49:16 -07:00
parent f180d4cacd
commit f8cca640a6
320 changed files with 2751 additions and 26682 deletions

View File

@@ -0,0 +1,31 @@
using Godot;
using System.Linq;
public partial class MegamiBeamShot : Projectile
{
[Export]
private PathFollow3D _pathFollow;
[Export]
public new AudioStream _soundEffect;
public override void _Ready()
{
_pathFollow = GetNode<PathFollow3D>("Path3D/PathFollow3D");
_pathFollow.GetParentNode3D().Rotation = ParentCharacter.GetNode<Node3D>("Pivot").Rotation;
var sfxPlayer = GetTree().Root.GetNode<AudioStreamPlayer>("Main/SFXPlayer");
sfxPlayer.Stream = _soundEffect;
sfxPlayer.Play();
}
public override void _PhysicsProcess(double delta)
{
_pathFollow.Progress += 10f * (float)delta;
if (Mathf.IsEqualApprox(_pathFollow.ProgressRatio, 1.0f))
QueueFree();
}
private void OnBulletHitObject(Node node)
{
QueueFree();
}
}