Add lantern on molo and delete zombie in day

This commit is contained in:
Kotrba Filip
2020-02-02 11:59:56 +01:00
parent a77718b134
commit 71725afb88
5 changed files with 99 additions and 5 deletions

View File

@@ -39,9 +39,9 @@ public class BarricadeManager : MonoBehaviour
public void addPlank()
{
if (health < (barricadePlanks.Count * 50)) {
if (health < (barricadePlanks.Count * 35)) {
audioSource.PlayOneShot(buildSound);
health += 50;
health += 35;
offMeshLink.enabled = false;
}
}
@@ -59,7 +59,7 @@ public class BarricadeManager : MonoBehaviour
{
for (int i = 0; i < barricadePlanks.Count; i++)
{
if (i < (health / 50)) {
if (i < (health / 35)) {
barricadePlanks[i].SetActive(true);
}
else

View File

@@ -38,6 +38,11 @@ public class SpawnManager : MonoBehaviour
if (!night)
{
alreadySpawn = false;
GameObject[] enemies = GameObject.FindGameObjectsWithTag("Enemy");
foreach (GameObject localEnemy in enemies)
{
Destroy(localEnemy);
}
}
if (!alreadySpawn && night)