public void LocalizedHit(LocalizedHitData data)
        {
            BuildingHealthChunk componentInParent = base.transform.GetComponentInParent <BuildingHealthChunk>();

            if (componentInParent)
            {
                componentInParent.LocalizedHit(data);
            }
        }
Exemplo n.º 2
0
 public int GetChunkIndex(BuildingHealthChunk buildingHealthChunk)
 {
     for (int i = 0; i < this._chunks.Length; i++)
     {
         if (object.ReferenceEquals(this._chunks[i], buildingHealthChunk))
         {
             return(i);
         }
     }
     return(-1);
 }