Gamejam Release

This commit is contained in:
2024-08-20 19:51:14 +02:00
parent 5b9766de50
commit a4660d6e4b
7 changed files with 387 additions and 42 deletions

View File

@@ -8,7 +8,10 @@ public class AssignableWorker : MonoBehaviour
private TogglePurchaseAmount purchaseAmount;
private GameManager gameManager;
private int workerAmount = 0;
[SerializeField]
private GameObject mouseNotificationLabel;
// Start is called before the first frame update
void Start()
{
@@ -29,6 +32,11 @@ public class AssignableWorker : MonoBehaviour
{
workersAssigned += workerAmount;
gameManager.RemoveResource(Resource.WORKER, workerAmount);
} else
{
GameObject infoLabel = Instantiate(mouseNotificationLabel, GameObject.Find("Canvas").transform);
infoLabel.GetComponent<MousePosLabel>().tmp.text = "No worker available!";
infoLabel.GetComponent<MousePosLabel>().direction = new Vector3(0, 4, 0);
}

View File

@@ -15,8 +15,7 @@ public class HouseManager : MonoBehaviour
[SerializeField]
private GameObject mouseNotificationLabel;
//House cost: Brick Tile Plank
// public int[] cost = new int[3] { 10, 5, 2 };
public int[] cost = new int[3] { 2, 1, 1 };
public int[] cost = new int[3] { 10, 5, 2 };
[SerializeField]
private Transform notificationOrigin;
[SerializeField]

View File

@@ -38,7 +38,7 @@ public class TogglePurchaseAmount : MonoBehaviour
private void UpdateDisplayAmount()
{
displayThing.text = "Toggle Purchase Amount x " + purchaseAmount.ToString();
displayThing.text = "Toggle Buy/Worker Amount x " + purchaseAmount.ToString();
}
public int GetPurchaseAmount()