kirill loh
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
using Unity.MLAgents;
|
||||
using UnityEngine;
|
||||
using System;
|
||||
|
||||
public class GameManager : MonoBehaviour
|
||||
{
|
||||
@ -19,6 +20,8 @@ public class GameManager : MonoBehaviour
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Academy.Instance.OnEnvironmentReset += ResetScene;
|
||||
|
||||
GlobalEventManager.onCaptureFlag += flagCaptured;
|
||||
GlobalEventManager.onTimeLeft += timeOut;
|
||||
|
||||
@ -77,4 +80,11 @@ public class GameManager : MonoBehaviour
|
||||
GlobalEventManager.onCaptureFlag -= flagCaptured;
|
||||
GlobalEventManager.onTimeLeft -= timeOut;
|
||||
}
|
||||
|
||||
public static event Action OnResetScene;
|
||||
private void ResetScene()
|
||||
{
|
||||
Debug.Log("Scene Reset");
|
||||
OnResetScene?.Invoke();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user