Ejemplo n.º 1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.CompareTag(TagManager.GetTagName(TagManager.Tag.PlayerDark)) || collision.CompareTag(TagManager.GetTagName(TagManager.Tag.PlayerLight)))
     {
         SaveDataManager.Instance.TutorialPassed = true;
         SceneLoader.Instance.LoadScene(_mainMenuName);
     }
 }
Ejemplo n.º 2
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.CompareTag(TagManager.GetTagName(TagManager.Tag.PlayerLight)))
     {
         if (Colour == SpikeColour.Black || Colour == SpikeColour.Red)
         {
             KillPlayer();
         }
     }
     else if (collision.CompareTag(TagManager.GetTagName(TagManager.Tag.PlayerDark)))
     {
         if (Colour == SpikeColour.White || Colour == SpikeColour.Red)
         {
             KillPlayer();
         }
     }
 }
Ejemplo n.º 3
0
 protected override void Awake()
 {
     base.Awake();
     _playerLight             = GameObject.FindGameObjectWithTag(TagManager.GetTagName(TagManager.Tag.PlayerLight));
     _obstacleCreationMethods = new ObstacleCreationMethod[] { CreateBlackAndWhiteObstacle, CreateDoubleSpikeObstacle, CreateSingleSpikeObstacle };
 }