Added resources to the game and prepared scripts for later usage
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
using Godot;
|
||||
|
||||
public class Building
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://cl2yvllo35qbb
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://bh4m8ufiv5kt8
|
||||
@@ -0,0 +1,5 @@
|
||||
using Godot;
|
||||
|
||||
public class Item
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://dpq18vk7hbakh
|
||||
Reference in New Issue
Block a user