void OnDestroy() { if (Instance == this) { Instance = null; ZDMap.ResetMap(); } }
void Start() { if (Instance && Instance != this) { Destroy(this); } else { Instance = this; } //Initialize Static Values. gameState = ZDGameState.Initialize; playerProps = new PlayerProps(); //Cache Component audioSource = GetComponent <AudioSource>(); //Initialize Game Resources. Initialize(); }