2024-11-27 17:58:30 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
public class snailRiderItem : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public enum Mode
|
|
|
|
|
{
|
|
|
|
|
accelerate,//<2F><><EFBFBD><EFBFBD>
|
2024-12-02 16:30:36 +08:00
|
|
|
|
slowDown, //<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
|
2024-11-27 17:58:30 +08:00
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|