mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-12 03:55:55 +00:00
Death animations and spawner
This commit is contained in:
parent
4fd31d7988
commit
16b7d936c9
13 changed files with 286 additions and 11 deletions
32
Scripts/Resources/Events/AlarmEnableEvent.cs
Normal file
32
Scripts/Resources/Events/AlarmEnableEvent.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
using Godot;
|
||||
using Godot.Collections;
|
||||
|
||||
namespace Cirno.Scripts.Resources.Events;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class AlarmEnableEvent : EventResource
|
||||
{
|
||||
private bool _isComplete = false;
|
||||
private AlarmManager _alarmManager;
|
||||
|
||||
public override bool IsComplete()
|
||||
{
|
||||
return _isComplete;
|
||||
}
|
||||
|
||||
public override void Init(Node2D parent)
|
||||
{
|
||||
_alarmManager = parent.GetAlarmManager();
|
||||
}
|
||||
|
||||
public override void Start(Node2D parent)
|
||||
{
|
||||
_alarmManager.SoundAlarm(parent.GlobalPosition);
|
||||
_isComplete = true;
|
||||
}
|
||||
|
||||
public override void UpdateEvent(double delta)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue