void OnCollisionEnter(Collision collision) { if (collision.transform.tag == "Player" && canBeTakenByPlayer) { gameObject.SetActive(false); _playerControl.Items.Add(this); if (transform.tag == "Item") { BeTaken(); } if (tipsManager != null) { tipsManager.SetTip(tipnum); } if (TeachGameManager.Instance && SceneManager.GetActiveScene().name == "Scene3") { TeachGameManager.Instance.ShowHint(new List <string> { "拿全道具后返回门处,即可通过本关", "依然注意不要碰到敌人" }); } if (UIManager.Instance) { UIManager.Instance.SetBubbleUI(bubbleText); } } if (!canBeTakenByPlayer && collision.transform.tag == "wall") { isGround = true; this.GetComponent <Rigidbody>().isKinematic = true; this.GetComponent <BoxCollider>().isTrigger = true; } //if (SceneManager.GetActiveScene().name == "Scene2") // if (!canBeTakenByPlayer && collision.transform.tag == "Player") // { // if (!football.activeSelf) // { // gameObject.SetActive(false); // } // } }