// Start is called before the first frame update void Start() { playerControllable = GameObject.FindGameObjectWithTag(GeneralVariables.PlayerTag).GetComponent <Controllable>(); animator = GetComponentInChildren <Animator>(); GameOverEvent.AddListener(onGameOver); ResolutionScreenSetup.OnLoadCheckpoint += onLoadCheckpoint; }
// Start is called before the first frame update void Start() { gameObject.layer = LayerMask.NameToLayer(GeneralVariables.PlayerTag); controllable = GetComponent <Controllable>(); inputProvider = GetComponent <UserInput>(); //hooking up components inputProvider.OnTapStart += controllable.TapStartPosition; inputProvider.OnTapMove += controllable.TapMove; inputProvider.OnTapEnd += controllable.TapEnd; GameOverEvent.AddListener(onGameOver); ResolutionScreenSetup.OnLoadCheckpoint += onLoadCheckpoint; }
// Start is called before the first frame update void Start() { gameOverSound = GetComponent <SoundEffectManager>().GetSoundEffect(GeneralVariables.SFX.GAME_OVER); GameOverEvent.AddListener(onGameOver); }
// Gameover support public void AddGameOverEventListner(UnityAction listener) { gameOverEvent.AddListener(listener); }
/// <summary> /// Adds the games over listener. /// </summary> /// <param name="listener">Listener.</param> public void AddGameOverListener(UnityAction <int> listener) { gameOverEvent.AddListener(listener); }
public void AddGameOverListener(UnityAction listener) { gameOver.AddListener(listener); }