示例#1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.CompareTag("DragDestination"))
     {
         Debug.Log("LIXO TOCOU");
         GameSound.gameSound.PlaySFX("error");
         controller.missedDrop();
         Destroy(this.gameObject);
     }
 }
示例#2
0
    // 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);
        }
    }