Exemplo n.º 1
0
 // 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;
 }
Exemplo n.º 2
0
        // 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);
 }
Exemplo n.º 4
0
 // Gameover support
 public void AddGameOverEventListner(UnityAction listener)
 {
     gameOverEvent.AddListener(listener);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Adds the games over listener.
 /// </summary>
 /// <param name="listener">Listener.</param>
 public void AddGameOverListener(UnityAction <int> listener)
 {
     gameOverEvent.AddListener(listener);
 }
Exemplo n.º 6
0
 public void AddGameOverListener(UnityAction listener)
 {
     gameOver.AddListener(listener);
 }