objective interface
This commit is contained in:
17
Assets/Game/Objective/ObjectiveHandler.cs
Normal file
17
Assets/Game/Objective/ObjectiveHandler.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
|
||||
public abstract class ObjectiveHandler : MonoBehaviour
|
||||
{
|
||||
// Describe the objective or target behaviour.
|
||||
public abstract string Description { get; }
|
||||
|
||||
public void OnObjectiveComplete(bool condition) {
|
||||
if (condition) {
|
||||
OnObjectiveSuccess();
|
||||
} else {
|
||||
OnObjectiveFail();
|
||||
}
|
||||
}
|
||||
public abstract void OnObjectiveSuccess();
|
||||
public abstract void OnObjectiveFail();
|
||||
}
|
||||
2
Assets/Game/Objective/ObjectiveHandler.cs.meta
Normal file
2
Assets/Game/Objective/ObjectiveHandler.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5c483724cc47744fa3210a866e974c1
|
||||
Reference in New Issue
Block a user