private void Travel() { OnTravel?.Invoke(); explosionSFX.Play(); explosionAnimator.SetTrigger("Explode"); bool foundBg = false; int index = 0; while (!foundBg) { index = UnityEngine.Random.Range(0, bgSprites.Count); foundBg = index != currentIndex; } currentIndex = index; background.sprite = bgSprites[index]; }
public void TravelTo() { OnTravel?.Invoke(this, EventArgs.Empty); }