Exemplo n.º 1
0
 // OnTriggerExit2D is called when the Collider2D other has stopped touching the trigger (2D physics only)
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (collision.transform.tag == "Shot")
     {
         if (ShotInRange == collision.transform.GetComponent <ShotBody>())
         {
             ShotInRange = null;
         }
     }
 }
Exemplo n.º 2
0
    // OnTriggerStay2D is called once per frame for every Collider2D other that is touching the trigger (2D physics only)
    private void OnTriggerStay2D(Collider2D collision)
    {
        if (collision.transform.tag == "Shot")
        {
            ShotInRange = collision.transform.GetComponent <ShotBody>();

            //if (Attacking || GameManager.BonusManager.IsAutoRange)
            //{
            //    if (GameManager.BonusManager.IsAutoRange)
            //    {
            //        RangeReducer(reduceScaleValue * GameManager.BonusManager.GetAutoRangeModifier());
            //    }

            //}
        }
    }