mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-11 10:15:53 +00:00
Changed events to generic node
This commit is contained in:
parent
b89043cd8c
commit
7b2d32e727
17 changed files with 166 additions and 135 deletions
|
|
@ -7,21 +7,25 @@ namespace Cirno.Scripts.Resources.Events;
|
|||
public partial class AlarmDisableEvent : EventResource
|
||||
{
|
||||
private bool _isComplete = false;
|
||||
private AlarmManager _alarmManager;
|
||||
|
||||
public override bool IsComplete()
|
||||
{
|
||||
return _isComplete;
|
||||
}
|
||||
|
||||
public override void Init(Node2D parent)
|
||||
public override void Init(Node parent)
|
||||
{
|
||||
_alarmManager = parent.GetAlarmManager();
|
||||
|
||||
}
|
||||
|
||||
public override void Start(Node2D parent)
|
||||
public override void Start(Node parent)
|
||||
{
|
||||
_alarmManager.DisableAlarm();
|
||||
if (AlarmManager.Instance is null)
|
||||
{
|
||||
_isComplete = true;
|
||||
return;
|
||||
};
|
||||
AlarmManager.Instance.DisableAlarm();
|
||||
_isComplete = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue