Komplett Lauffähig + Vibration + Boni + Enemie "Jumpscares" - Audio

This commit is contained in:
2026-02-17 21:15:37 +01:00
parent 8b0452b1ed
commit 655e91627a
54 changed files with 8214 additions and 403 deletions

View File

@@ -27,7 +27,7 @@ public class ShopScript : MonoBehaviour
[Header("BuyValues")]
private float moneten = 10.00f; //als vorerstiger Ersatz für tatsächliches Geld
private float moneten = 10f; //als vorerstiger Ersatz für tatsächliches Geld
private float gemsCost = 1.00f; //1€
private float manyGemsCost = 2.00f; //2€
@@ -39,6 +39,7 @@ public class ShopScript : MonoBehaviour
[Header("DevMode")]
[SerializeField] GameObject devPanel;
[SerializeField] GameObject devButton;
//TMP_Text textfeldA; //als textfeld
//TMP_Text textfeldB;
@@ -62,6 +63,7 @@ public class ShopScript : MonoBehaviour
inventory = backgroundPanel.GetComponent<InventoryScript>();
healthScript = backgroundPanel.GetComponent<ChangeHealth>();
battery = backgroundPanel.GetComponent<HandleEnergy>();
}
void Start()
@@ -84,8 +86,8 @@ public class ShopScript : MonoBehaviour
textfeld.text = inventory.Gems.ToString();
textfeldA.text = "Energy: " + inventory.Energy.ToString();
textfeldB.text = "Health: " + inventory.Health.ToString();
textfeldA.text = "Energy: " + inventory.StandardEnergy.ToString();
textfeldB.text = "Health: " + inventory.StandardHealth.ToString();
textfeldC.text = "Moneten: " + moneten.ToString();
}
@@ -94,7 +96,7 @@ public class ShopScript : MonoBehaviour
{
shopPanel.SetActive(true);
LeanTween.scale(shopPanel, transform.localScale * 0.5f, duration * Time.deltaTime).setDelay(.1f).setEase(LeanTweenType.easeOutBounce);
Vibrator.Vibrate();
}
public void CloseShop()
@@ -121,7 +123,7 @@ public class ShopScript : MonoBehaviour
else
{
healthScript.standardHealth++;
inventory.StandardHealth++;
inventory.Gems -= updateCost;
}
@@ -138,7 +140,7 @@ public class ShopScript : MonoBehaviour
else
{
battery.standardEnergy++;
inventory.StandardEnergy++;
inventory.Gems -= updateCost;
}
@@ -214,6 +216,18 @@ public class ShopScript : MonoBehaviour
//textfeldC.text = moneten.ToString();
}
public void ResetValues()
{
inventory.Gems = 100;
inventory.StandardEnergy = 10;
inventory.StandardHealth = 3;
moneten = 10f;
errorPanel.SetActive(true);
errorText.text = "All values have been reset to standard.";
LeanTween.scale(errorPanel, transform.localScale * 0.5f, duration * Time.deltaTime).setDelay(.1f).setEase(LeanTweenType.easeOutBounce);
}
public void ChangeActivation()
{
SpriteRenderer spriteRenderer = GetComponent<SpriteRenderer>();