Shop weitergebaut, CreditsScene angepasst, MainMenue weiter verschönert, an Monetarisierung gearbeitet

This commit is contained in:
2026-01-29 09:53:57 +01:00
parent 4c5de64949
commit 7aadd14cbc
19 changed files with 2855 additions and 127 deletions

View File

@@ -0,0 +1,74 @@
using JetBrains.Annotations;
using TMPro;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UIElements;
public class CreditsScript : MonoBehaviour
{
public float scrollSpeed;
private float maxScrollSpeed = 300f;
[SerializeField] public float maxYPosition;
[SerializeField] public float minYPosition;
[SerializeField] public TMP_Text text;
TMP_Text textfeld;
private RectTransform rectTransform;
void Start()
{
scrollSpeed = 200f;
textfeld = this.text;
maxYPosition = 3200;
minYPosition = 0;
rectTransform = GetComponent<RectTransform>();
Credits();
}
void Update()
{
rectTransform.anchoredPosition += new Vector2(0, scrollSpeed * Time.deltaTime);
if (transform.position.y >= maxYPosition)
{
//Credits wieder nach unten packen, damit sie loopen
//this.transform.position.y = minYPosition;
Debug.Log("The End");
}
}
public void HurryUp()
{
//scrollSpeed = 50f;
scrollSpeed = maxScrollSpeed;
//if (scrollSpeed > maxScrollSpeed)
//{
// scrollSpeed = maxScrollSpeed;
//}
//else
//{
// scrollSpeed = 50f;
//}
}
public void Credits()
{
//die Credits einfach hardcoden, dann kann ich die schneller anpassen
//funktioniert
textfeld.text = "Assets" +
"Dark UI kit by kΩsmaragd on Unity Store" +
"Clean Vector Icons by PONETI on Unity Store" +
"UX Flat Icons [Free] by Heathen Engineering on Unity Store" +
"Help Me Font by GGBotNet on itch.io ";
}
}

View File

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

View File

@@ -1,8 +1,15 @@
using TMPro;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UIElements;
public class MenueScript : MonoBehaviour
{
public void ReturnHome()
{
SceneManager.LoadSceneAsync(0);
}
public void GameStart()
{
SceneManager.LoadSceneAsync(5);

View File

@@ -1,4 +1,5 @@
using System.Xml.Serialization;
using TMPro;
using Unity.VisualScripting;
using UnityEngine;
@@ -6,26 +7,31 @@ public class ShopScript : MonoBehaviour
{
[SerializeField] GameObject shopPanel;
[SerializeField] GameObject errorPanel;
public InventoryScript player;
InventoryScript player;
private bool paymentSystemActive = true;
private bool paymentSystemActive = false;
[SerializeField] TMP_Text text;
TMP_Text textfeld;
//InventoryScript player;
// 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);
textfeld = this.text;
//player = GetComponent<InventoryScript>();
}
// Update is called once per frame
void Update()
{
textfeld.text = InventoryScript.deineMudda.ToString();
}
public void OpenShop()
{
shopPanel.SetActive(true);
@@ -36,6 +42,11 @@ public class ShopScript : MonoBehaviour
shopPanel.SetActive(false);
}
public void ClosePanel()
{
errorPanel.SetActive(false);
}
public void AddLife()
{
player.Health++;
@@ -61,6 +72,9 @@ public class ShopScript : MonoBehaviour
public void BuyMore()
{
int manyGemsCost = 200;
if (paymentSystemActive)
{

View File

@@ -0,0 +1,51 @@
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;
public class TweenScript : MonoBehaviour
{
[SerializeField] private float duration;
[SerializeField] private GameObject button;
//private KeyCode secretCode = KeyCode.G;
Vector3 ort = new Vector3();
public void Start()
{
duration = 2;
//button = this.GameObject;
}
public void Update()
{
OnClick();
}
public void Scale()
{
LeanTween.scale(button, transform.localScale * 1.1f, duration * Time.deltaTime).setEase(LeanTweenType.easeOutBounce);
//LeanTween.scale(Trinagle, new Vector3(2,2,2), duration).setOnComplete(Debug.Log);
}
private void Move()
{
LeanTween.moveX(button, button.transform.position.y, duration * Time.deltaTime);
}
public void Bounce()
{
//code folgt
//code steht in scale
//mach circle bounce on space press
}
public void OnClick()
{
if (Input.GetKeyDown(KeyCode.Mouse1))
{
Scale();
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 0116161a3779aa24a919d65f454bee69