public IEnumerator highlightAll(GameButtonSpriteHandler.SpriteType type, bool backToNormal = true) { for (int i = 1; i <= buttons.Length; i++) { highlightButton(i, type); } if (backToNormal) { yield return new WaitForSeconds(0.4f); for (int i = 1; i <= buttons.Length; i++) { highlightButton(i, GameButtonSpriteHandler.SpriteType.NORMAL); } } }
public void highlightButton(int number, GameButtonSpriteHandler.SpriteType type) { number--; buttons[number].GetComponent<GameButtonSpriteHandler>().switchSprite(type); }
public IEnumerator delayedHighlightButton(int number, GameButtonSpriteHandler.SpriteType type, float delay) { yield return new WaitForSeconds(delay); highlightButton(number, type); }