void OnTriggerEnter2D(Collider2D collider) { if (collider.gameObject.name == playerTag && isAdd == true) { this.isAdd = false; count.AddCoin(); Destroy(this.gameObject); print("Coint get"); } }
void GetCoin() { if (isAdd == true) { isAdd = false; count.AddCoin(); //this.director.GetComponent<UIController1_2>().AddCoin(); Destroy(this.content); print("coutn"); } }