Added resources to the game and prepared scripts for later usage

This commit is contained in:
=
2026-04-29 18:03:43 +02:00
parent 253c7d9f89
commit c54ff3088e
15 changed files with 102 additions and 56 deletions
+30
View File
@@ -0,0 +1,30 @@
using Godot;
public class GameResource
{
int maxAmount;
int currentAmount;
bool isEndless;
float extractionSpeed;
public string name;
public GameResource(string name)
{
this.name = name;
maxAmount = GameData.rand.Next(1000, 10000);
currentAmount = maxAmount;
isEndless = false;
extractionSpeed = 1f;
}
public bool Extract()
{
if(isEndless) return true;
if (currentAmount > 0)
{
currentAmount--;
return true;
}
return false;
}
}