// PRIVATE MODIFIERS private void UpdateListenArea() { Collider2D[] col = Physics2D.OverlapCircleAll(transform.position, god.max_radius * listen_percent); //Debug.Log(col.Length); for (int i = 0; i < col.Length; ++i) { WorldComponent wc = col[i].gameObject.GetComponent <WorldComponent>(); if (wc != null) { wc.TurnOn(); } } }
private void UpdateHypotheticalListenArea() { if (this != god.GetActiveNPC()) { return; } Collider2D[] col = Physics2D.OverlapCircleAll(transform.position, god.GetHypotheticalPercent() * god.max_radius); //Debug.Log(col.Length); for (int i = 0; i < col.Length; ++i) { WorldComponent wc = col[i].gameObject.GetComponent <WorldComponent>(); if (wc != null) { wc.TurnOn(); wc.SetColored(true); } } }