void Awake() { CheckpointReachedEvent.Register(OnCheckpointPassed); EnemyDeathEvent.Register(onEnemyKilled); GameOverEvent.Register(onGameOver); PickUpEvent.Register(onPickup); PlayerDamagedEvent.Register(onPlayerDamaged); PlayerDeathEvent.Register(onPlayerDeath); GameStartEvent.Register(onGameStart); respawnCounter = Lives; RespawnFadeObject = GameObject.Find(RespawnFadeObjectName); }
void Start() { audioSource = GetComponent <AudioSource>(); EnemyDeathEvent.Register(onEnemyDeath); }