Polish and Bugfixes for feature lock release

This commit is contained in:
2024-08-20 00:30:56 +02:00
parent 36a4cee826
commit c52b70cd0f
67 changed files with 7008 additions and 337 deletions

View File

@@ -1,6 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class HouseManager : MonoBehaviour
{
@@ -15,6 +16,8 @@ public class HouseManager : MonoBehaviour
public int[] cost = new int[3] { 10, 5, 2 };
[SerializeField]
private Transform notificationOrigin;
[SerializeField]
private TMP_Text houseReqLabel;
// Start is called before the first frame update
void Start()
{
@@ -24,6 +27,9 @@ public class HouseManager : MonoBehaviour
// Update is called once per frame
void Update()
{
houseReqLabel.text = $"{gameManager.GetResourceCount(Resource.BRICK)}/{cost[0]} Bricks\n" +
$"{gameManager.GetResourceCount(Resource.TILE)}/{cost[1]} Tiles\n" +
$"{gameManager.GetResourceCount(Resource.PLANKS)}/{cost[2]} Planks\n";
if (currentTtnw > 0)
{
currentTtnw -= Time.deltaTime;

View File

@@ -23,6 +23,7 @@ public class Mine : MonoBehaviour
// Update is called once per frame
void Update()
{
storedLabel.text = gameManager.GetResourceCount(resource).ToString();
nextTick -= Time.deltaTime;
if (nextTick <= 0f)
{
@@ -32,8 +33,7 @@ public class Mine : MonoBehaviour
}
private void Tick()
{
storedLabel.text = gameManager.GetResourceCount(resource).ToString();
{
gameManager.AddResource(resource, 1 * assignableWorker.GetAssignedWorkers());
}

View File

@@ -10,6 +10,7 @@ public class Monument
public string description;
public int brickCost, tileCost, plankCost;
public GameObject worldObject;
public GameObject cover;
}
public class MonumentManager : MonoBehaviour
{
@@ -50,6 +51,7 @@ public class MonumentManager : MonoBehaviour
availableResources[Resource.TILE] -= monument.tileCost;
availableResources[Resource.PLANKS] -= monument.plankCost;
monument.worldObject.GetComponent<Renderer>().material.color = Color.green;
Destroy(monument.cover);
lastMonumentIndex = i;
} else
{