void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("DragDestination")) { Debug.Log("LIXO TOCOU"); GameSound.gameSound.PlaySFX("error"); controller.missedDrop(); Destroy(this.gameObject); } }
// Update is called once per frame void Update() { this.gameObject.transform.Translate(0, speed * Time.deltaTime, 0); if (this.gameObject.transform.position.y < 0) { Debug.Log("gota saiu fora"); controller.missedDrop(); Destroy(this.gameObject); } }