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];
    }
Beispiel #2
0
 public void TravelTo()
 {
     OnTravel?.Invoke(this, EventArgs.Empty);
 }