public void ChangeEarth() { bool allow = true; int value = CurrentEarthIndex + 1; Sprite sprite = earthTypes[value]; OnEarthChangeRequested?.Invoke(sprite, ref allow); if (allow == false) { return; } CurrentEarthIndex += 1; earth.DrawEarth(sprite); }