public void RemoveLife() { lives -= 1; OnLifeLost?.Invoke(lives); if (lives == 0) { OnLevelPause?.Invoke(false); OnLevelLose?.Invoke(); } }
private void Awake() { if (onLevelBegin == null) { onLevelBegin = new OnLevelBegin(); } if (onLevelLose == null) { onLevelLose = new OnLevelLose(); } if (onLevelEnd == null) { onLevelEnd = new OnLevelEnd(); } }