mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-03 18:05:53 +00:00
24 lines
No EOL
634 B
C#
24 lines
No EOL
634 B
C#
using Godot;
|
|
|
|
namespace Cirno.Scripts.Actors._3D;
|
|
|
|
public partial class SecurityCamera3D : Destructible3D
|
|
{
|
|
[Export] public StringName SweepAnimation { get; private set; } = "SweepLoop";
|
|
|
|
[Signal]
|
|
public delegate void AnimationStartEventHandler(string animationName);
|
|
|
|
public override void _Ready()
|
|
{
|
|
if (Engine.IsEditorHint()) return;
|
|
EmitSignalAnimationStart(SweepAnimation);
|
|
}
|
|
|
|
public void OnBodySighted(Node3D body)
|
|
{
|
|
if (Engine.IsEditorHint()) return;
|
|
GD.Print($"{body.Name} Sighted!");
|
|
AlarmManager.Instance?.SoundAlarm(this.GlobalPosition);
|
|
}
|
|
} |