Ejemplo n.º 1
0
 void OnTriggerEnter2D(Collider2D collider)
 {
     if (PhotonNetwork.isMasterClient && collider.tag == "Player" && collider.gameObject.GetComponent <PlayerManager>().GetPlayerClass() == 1)
     {
         Debug.Log("Mandei Adicionar e destrui");
         eManager.AddScraps(scrapValue);
         PhotonNetwork.Destroy(gameObject);
         PhotonNetwork.Destroy(gameObject);
     }
 }