Ejemplo n.º 1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.tag == "Death")
     {
         //Rewinding = true;
         //if (!pwupManager.RewindOn)
         //{
         Death = true;
         theGameManager.RestartGame();
         movespeed           = movespeedStore;
         speedMilestoneCount = speedMileStoneStore;
         DeadCount++;
         if (DeadCount == 4)
         {
             playads.ADWORK();
             DeadCount = 0;
             //    }
         }
     }
     if (other.gameObject.tag == "Master" || other.gameObject.tag == "Razor")
     {
         Physics2D.IgnoreCollision(other.GetComponent <Collider2D>(), GetComponent <Collider2D>());
     }
 }
Ejemplo n.º 2
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.gameObject.tag == "Player")
        {
            theGameManager.RestartGame();

            player.movespeed           = player.movespeedStore;
            player.speedMilestoneCount = player.speedMileStoneStore;
            player.DeadCount++;
            if (player.DeadCount == 4)
            {
                playads.ADWORK();
                player.DeadCount = 0;
            }
        }
    }