updated building.cs, buildingContruction.cs, buildingBlueprint.cs

This commit is contained in:
DerTyp187
2021-09-25 22:54:18 +02:00
parent 880e5a2424
commit 7af73ae68b
42 changed files with 1629 additions and 833 deletions

View File

@@ -0,0 +1,31 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HouseConstruction : BuildingConstruction
{
private GameObject gameManager;
[Header("Needed Resources")]
[SerializeField] private int neededWood = 10;
[Header("Having Resources")]
[SerializeField] private int havingWood = 0;
public override void Init()
{
gameManager = GameObject.Find("GameManager");
gameManager.GetComponent<EventLog>().CreateEvent("Construction: House");
}
public override bool CheckForResources()
{
if (havingWood == neededWood)
{
gameManager.GetComponent<EventLog>().CreateEvent("Construction: House: finished");
return true;
}
return false;
}
}