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