This commit is contained in:
Samir Badi 2024-11-08 12:30:00 -05:00
parent 10ed6cb2ea
commit 8f1bc0fa57
4 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 799293e920c24f42b0ded460fcdd845e
timeCreated: 1731086558

View File

@ -0,0 +1,15 @@
using System;
using GameOff.Core;
using UnityEngine;
namespace GameOff.Basic
{
[DefaultExecutionOrder(-200)]
public class ClearStatic: MonoBehaviour
{
private void Awake()
{
PlayerMain.ClearStaticVariables();
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e4f03d0416944ce7b510499a9d57eff1
timeCreated: 1731086571

View File

@ -7,7 +7,11 @@ namespace GameOff.Core
public class PlayerMain : MonoBehaviour public class PlayerMain : MonoBehaviour
{ {
public static PlayerMain Instance { get; private set; } public static PlayerMain Instance { get; private set; }
public static void ClearStaticVariables()
{
Instance = null;
}
public event EventHandler<bool> OnStateUpdate; public event EventHandler<bool> OnStateUpdate;
private PlayerInputHandler _inputHandler; private PlayerInputHandler _inputHandler;