_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/RacingPanel/snailRiderItem.cs
2024-12-02 16:30:36 +08:00

31 lines
578 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;
}
}
}