private void RegisterBankAsCallback(SoundProfile profile, SoundDatabase soundDatabase) { if (profile != null && soundDatabase != null) { soundDatabase.Create(profile); this.resourceLoadingCounter--; if (this.resourceLoadingCounter == 0) { this.activeCallback(soundDatabase, false); } else { SoundLib.Log("resourceLoadingCounter > 0! resourceLoadingCounter: " + this.resourceLoadingCounter); this.activeCallback(soundDatabase, true); } } else { SoundLib.Log("either profile OR soundDatabase is null"); this.resourceLoadingCounter--; if (this.resourceLoadingCounter == 0) { this.activeCallback(soundDatabase, true); } else { SoundLib.Log("resourceLoadingCounter > 0! resourceLoadingCounter: " + this.resourceLoadingCounter); this.activeCallback(soundDatabase, true); } } }