MainMenue weiterbearbeitet und Shop angelegt

This commit is contained in:
2026-01-21 13:09:50 +01:00
parent 58eed85324
commit 4c5de64949
251 changed files with 7086 additions and 5178 deletions

View File

@@ -0,0 +1,74 @@
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);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 1a63d792debb71643a4072a0cc116dbe