_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/RacingPanel/snailRiderItem.cs
舒荣森 c7d9c66033 add
2024-11-27 17:58:30 +08:00

30 lines
568 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class snailRiderItem : MonoBehaviour
{
public enum Mode
{
accelerate,//źÓËŮ
slowDown//źőËŮ
}
public Mode mode = Mode.accelerate;
public Sprite accelerate;
public Sprite slowDown;
private void Update()
{
if (mode == Mode.accelerate)
{
GetComponent<Image>().sprite = accelerate;
}
else
{
GetComponent<Image>().sprite = slowDown;
}
}
}