///////////////////////////////////////////// void Awake() { #if DEBUG //Let's assume that when the release is built, theese checks are passed if (eventToFollow == null) { Debug.LogError("Shake " + name + ": component not correctly initialized."); enabled = false; return; } #endif eventToFollow.RegisterForEvent(ShakeObject); }
///////////////////////////////////////////// void Awake() { #if DEBUG //Let's assume that when the release is built, theese checks are passed if (playerDie == null || restartGame == null) { Debug.LogError("GameManager " + name + ": component not correctly initialized."); enabled = false; return; } #endif playerDie.RegisterForEvent(FreezeGame); restartGame.RegisterForEvent(ReloadLevel); }