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 DaileyButton : MonoBehaviour
- {
- [SerializeField] public int DaileyButtons;
- [SerializeField] private DaileyManagment DaileyManagment;
- private bool prizeGeholt;
- [SerializeField] private Sprite hakenImage;
- [SerializeField] private Sprite kreuzImage;
- // Start is called before the first frame update
- void Start()
- {
- }
- // Update is called once per frame
- public void Update()
- {
- if (DaileyManagment.day == DaileyButtons)
- {
- GetComponent<Button>().interactable = true;
- }
- else
- {
- GetComponent<Button>().interactable = false;
- }
- }
- public void Verloren()
- {
- if (prizeGeholt)
- {
- GetComponent<Image>().sprite = kreuzImage;
- }
- else
- {
- GetComponent<Image>().sprite = hakenImage;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement