Last active
November 4, 2022 08:20
-
-
Save daniele-quero/fd821db89f4eec746998b9c3b26b8e04 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void PlayNext() | |
{ | |
HorseState currentState = horseAnimationHandler.GetCurrentState(); | |
switch (currentState) | |
{ | |
case HorseState.stillHorse: | |
case HorseState.muscleToHorse: | |
prevButton.interactable = true; | |
horseAnimationHandler.Play(HorseState.horseToMuscle.ToString()); | |
break; | |
case HorseState.boneToMuscle: | |
case HorseState.horseToMuscle: | |
horseAnimationHandler.Play(HorseState.muscleToBone.ToString()); | |
nextButton.interactable = false; | |
break; | |
case HorseState.muscleToBone: | |
break; | |
default: | |
break; | |
} | |
} | |
public void PlayPrev() | |
{ | |
HorseState currentState = horseAnimationHandler.GetCurrentState(); | |
switch (currentState) | |
{ | |
case HorseState.stillHorse: | |
case HorseState.muscleToHorse: | |
break; | |
case HorseState.boneToMuscle: | |
case HorseState.horseToMuscle: | |
horseAnimationHandler.Play(HorseState.muscleToHorse.ToString()); | |
prevButton.interactable = false; | |
break; | |
case HorseState.muscleToBone: | |
horseAnimationHandler.Play(HorseState.boneToMuscle.ToString()); | |
nextButton.interactable = true; | |
break; | |
default: | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment