Health and Energy Logic ausgeführt, GameOver und LevelTime Scripte angelegt, Timer (aber keinen krassen coolen) eingebaut
This commit is contained in:
@@ -18,7 +18,14 @@ public class ShopScript : MonoBehaviour
|
||||
|
||||
//TMP_Text textfeld;
|
||||
[SerializeField] TMP_Text textfeld;
|
||||
|
||||
[Header("Scripte")]
|
||||
|
||||
InventoryScript inventory;
|
||||
ChangeHealth healthScript;
|
||||
HandleEnergy battery;
|
||||
|
||||
[Header("BuyValues")]
|
||||
|
||||
private float moneten = 10.00f; //als vorerstiger Ersatz für tatsächliches Geld
|
||||
|
||||
@@ -53,6 +60,8 @@ public class ShopScript : MonoBehaviour
|
||||
private void Awake()
|
||||
{
|
||||
inventory = backgroundPanel.GetComponent<InventoryScript>();
|
||||
healthScript = backgroundPanel.GetComponent<ChangeHealth>();
|
||||
battery = backgroundPanel.GetComponent<HandleEnergy>();
|
||||
|
||||
}
|
||||
void Start()
|
||||
@@ -112,7 +121,7 @@ public class ShopScript : MonoBehaviour
|
||||
|
||||
else
|
||||
{
|
||||
inventory.Health++;
|
||||
healthScript.standardHealth++;
|
||||
|
||||
inventory.Gems -= updateCost;
|
||||
}
|
||||
@@ -129,7 +138,7 @@ public class ShopScript : MonoBehaviour
|
||||
|
||||
else
|
||||
{
|
||||
inventory.Energy++;
|
||||
battery.standardEnergy++;
|
||||
|
||||
inventory.Gems -= updateCost;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user