29 lines
548 B
C#
29 lines
548 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class ChangeBtnImg : MonoBehaviour
|
|
{
|
|
Image img;
|
|
public Sprite pause, unpause;
|
|
public bool bolpause = false;
|
|
|
|
private void Start()
|
|
{
|
|
img = GetComponent<Image>();
|
|
}
|
|
public void changeSprite() {
|
|
if (bolpause)
|
|
{
|
|
img.sprite = unpause;
|
|
bolpause = false;
|
|
}
|
|
else
|
|
{
|
|
img.sprite = pause;
|
|
bolpause = true;
|
|
}
|
|
}
|
|
}
|