Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class PlayPauseButtonSprite : MonoBehaviour
- {
- PlayPauseButton RefScript;
- Image playImage;
- public Sprite playSprite;
- public Sprite pauseSprite;
- void Start()
- {
- playImage = GetComponent<Image>();
- RefScript = GetComponent<PlayPauseButton>();
- }
- public void Update()
- {
- if (RefScript.play == false)
- // if (Input.GetKey(KeyCode.Space))
- {
- //Debug.Log(RefScript.play);
- playImage.sprite = playSprite;
- // RefScript.play = true;
- }
- if (RefScript.play == true)
- {
- playImage.sprite = pauseSprite;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement