void FixedUpdate()
 {
     if (fogOfWar != null)
     {
         if (fogOfWar != null && fogOfWar.enabled && fogOfWar.gameObject.active)
         {
             for (int i = 0; i < thisRenderer.Length; i++)
             {
                 thisRenderer[i].enabled = fogOfWar.IsRevealed(transform.position);
                 isVisible = fogOfWar.IsRevealed(transform.position);
             }
         }
     }
 }
示例#2
0
 void Update()
 {
     if (fogOfWar != null && fogOfWar.enabled && fogOfWar.gameObject.active)
     {
         renderer.enabled = fogOfWar.IsRevealed(transform.position);
     }
 }