Esempio n. 1
0
 // 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();
         }
     }
 }
Esempio n. 2
0
    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);
            }
        }
    }