Exemplo n.º 1
0
    public void OnTriggerExit2D(Collider2D other)
    {
        Sightable sightableObject = other.GetComponent <Sightable>();

        sightableObject.sightOutOfRange();
        sightablesInRange.Remove(sightableObject);
    }
Exemplo n.º 2
0
    public void OnTriggerEnter2D(Collider2D other)
    {
        Sightable sightableObject = other.GetComponent <Sightable>();

        sightableObject.sightInRange();
        sightablesInRange.Add(sightableObject);
    }