// returns true when we get destroyed public void TakeDamage(int damage) { health -= damage; float t = (float)health / startHealth; matrix.m11 = depth * t + Random.Range(0f, .1f); matrix.m13 = matrix.m11 * .5f; Farm.rockMatrices[batchNumber][batchIndex] = matrix; if (health <= 0) { Farm.DeleteRock(this); } }