void OnCollisionEnter2D(Collision2D col) { if (col.gameObject.tag == "Player") { item.Succes(); gameObject.SetActive(false); manager.Shopping(); } }
void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player" && (sceneIndex == 1 || sceneIndex == 4 || sceneIndex == 10)) { item.Succes(); gameObject.SetActive(false); manager.Shopping(); } if (collision.tag == "Player" && (sceneIndex == 7)) { gameObject.SetActive(false); itemf.Fly(); } }
public void SetFood() { ruoka = true; food.Succes(); }
public void SetShower() { suihku = true; shower.Succes(); }