Пример #1
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Player")
     {
         PlayerStatus    player          = other.gameObject.GetComponent <PlayerStatus>();
         PlayerControlls playerControlls = other.gameObject.GetComponent <PlayerControlls>();
         if (player.haveKey == true)
         {
             tilePosition = this.gameObject.transform.parent.position;
             gameStatsCounter.levelsPassedCount += 1;
             creator.playerTriggerDrop           = true;
             floorDrop = true;
             creator.DropUpperFloor();
             Destroy(this.gameObject.GetComponent <Collider2D>());
         }
     }
 }