Files
Babushka/scripts/CSharp/Common/Quest/QuestTrigger.cs
T

24 lines
642 B
C#
Raw Normal View History

2025-05-19 11:12:23 +02:00
using Godot;
using System;
using Babushka.scripts.CSharp.Common.Quest;
public partial class QuestTrigger : Node
{
[Export]
2025-06-16 20:45:09 +02:00
public QuestResource? questResource;
2025-05-19 11:12:23 +02:00
[Export]
public QuestStatus.Status toStatus;
public void Trigger()
{
2025-06-16 20:45:09 +02:00
if(questResource== null)
throw new Exception("QuestResource is not set on QuestTrigger node.");
if(QuestManager.Instance == null)
throw new Exception("QuestManager instance is not available. Make sure it is initialized before calling Trigger.");
2025-05-19 11:12:23 +02:00
QuestManager.Instance.ChangeQuestStatus(questResource, toStatus);
}
}