Files
ConvenientHorror/Assets/Scripts/Button Functions/ShopScript.cs

75 lines
1.2 KiB
C#

using System.Xml.Serialization;
using Unity.VisualScripting;
using UnityEngine;
public class ShopScript : MonoBehaviour
{
[SerializeField] GameObject shopPanel;
[SerializeField] GameObject errorPanel;
public InventoryScript player;
private bool paymentSystemActive = true;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
player = GetComponent<InventoryScript>();
shopPanel.SetActive(false);
errorPanel.SetActive(false);
}
// Update is called once per frame
void Update()
{
}
public void OpenShop()
{
shopPanel.SetActive(true);
}
public void CloseShop()
{
shopPanel.SetActive(false);
}
public void AddLife()
{
player.Health++;
}
public void AddEnergy()
{
player.Energy++;
}
public void BuyGems()
{
if (paymentSystemActive)
{
}
else
{
errorPanel.SetActive(true);
}
}
public void BuyMore()
{
if (paymentSystemActive)
{
}
else
{
errorPanel.SetActive(true);
}
}
}