using UnityEngine;
using UnityEngine.UI;

public class RulesButtons : MonoBehaviour
{
    [SerializeField] private GameObject leftButton;
    [SerializeField] private GameObject rightButton;
    [SerializeField] private GameObject rules;
    [SerializeField] private Sprite rules1;
    [SerializeField] private Sprite rules2;
    private Image image;

    private void Start()
    {
        image = rules.GetComponent<Image>();
        rightButton.SetActive(true);
        leftButton.SetActive(false);
    }

    public void LeftButton()
    {
        image.sprite = rules1;
        rightButton.SetActive(true);
        leftButton.SetActive(false);
    }

    public void RightButton()
    {
        image.sprite = rules2;
        leftButton.SetActive(true);
        rightButton.SetActive(false);
    }
}