public static void RegisterFogZone(FogZone fz)
 {
     singleton.fogZones.Add (fz);
 }
 public static void RemoveFogZone(FogZone fz)
 {
     singleton.fogZones.Remove(fz);
 }
    void ProcessFogZone(FogZone zone)
    {
        // get the tile position of the object
        int baseXPos = CheckBoundsX(zone.thisTransform.position.x-0.5f);
        int baseYPos = CheckBoundsY(zone.thisTransform.position.z-0.5f);

        int xPos;
        int yPos;

        // iterate over all the tiles
        for(int i=0;i<zone.fogTileZone.Length;i++){

            xPos = CheckBoundsX(zone.fogTileZone[i].x + baseXPos);
            yPos = CheckBoundsY(zone.fogTileZone[i].y + baseYPos);

            // check the fog teams
            if(zone.team == FogTeam.Vampires){
                world[xPos,yPos].vampireFog = BoundFog(world[xPos,yPos].vampireFog + zone.fogTileZone[i].fogLevel);
            }
            else if(zone.team == FogTeam.Hunters){
                world[xPos,yPos].hunterFog = BoundFog(world[xPos,yPos].hunterFog + zone.fogTileZone[i].fogLevel);
            }
            else{
                world[xPos,yPos].fog = BoundFog(world[xPos,yPos].fog - zone.fogTileZone[i].fogLevel);
            }
        }
    }