blob: cbbce3c61c77f36ab3f224e906d30fc60e7b77f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
using System;
using System.Collections.Generic;
using UnityEngine;
[Serializable]
public class Wave
{
[TextArea]
public string warningText;
public List<Spawn> spawns = new List<Spawn>();
public void Reset(bool _resetGold = true)
{
for (int i = 0; i < spawns.Count; i++)
{
spawns[i].Reset(_resetGold);
}
}
public void Update()
{
for (int i = 0; i < spawns.Count; i++)
{
spawns[i].Update();
}
}
public bool HasFinished()
{
int num = 0;
for (int i = 0; i < spawns.Count; i++)
{
if (spawns[i].Finished)
{
num++;
}
}
if (num >= spawns.Count)
{
return true;
}
return false;
}
}
|