This commit is contained in:
OliverS 2024-04-21 06:48:59 +02:00
commit d68f217dc6
3 changed files with 14 additions and 1 deletions

View File

@ -934,6 +934,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
tooltip: {fileID: 7959461870474528235} tooltip: {fileID: 7959461870474528235}
ExtraExitCollider: {fileID: 3164206115851743815}
ButtonIndex: -1 ButtonIndex: -1
--- !u!1 &1444386719009988973 --- !u!1 &1444386719009988973
GameObject: GameObject:
@ -1667,6 +1668,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
tooltip: {fileID: 8584771696634545955} tooltip: {fileID: 8584771696634545955}
ExtraExitCollider: {fileID: 3164206115851743815}
ButtonIndex: -1 ButtonIndex: -1
--- !u!1 &3452371300238378862 --- !u!1 &3452371300238378862
GameObject: GameObject:
@ -3072,6 +3074,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
tooltip: {fileID: 2899067781696711495} tooltip: {fileID: 2899067781696711495}
ExtraExitCollider: {fileID: 3164206115851743815}
ButtonIndex: -1 ButtonIndex: -1
--- !u!1 &5621856367784821633 --- !u!1 &5621856367784821633
GameObject: GameObject:
@ -3950,6 +3953,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
tooltip: {fileID: 4502190811754076786} tooltip: {fileID: 4502190811754076786}
ExtraExitCollider: {fileID: 3164206115851743815}
ButtonIndex: -1 ButtonIndex: -1
--- !u!1 &8438906130455969465 --- !u!1 &8438906130455969465
GameObject: GameObject:
@ -4546,6 +4550,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
tooltip: {fileID: 1475988817490299594} tooltip: {fileID: 1475988817490299594}
ExtraExitCollider: {fileID: 3164206115851743815}
ButtonIndex: -1 ButtonIndex: -1
--- !u!1001 &1148800059794808287 --- !u!1001 &1148800059794808287
PrefabInstance: PrefabInstance:

View File

@ -36,7 +36,6 @@ public class EnemySpawnManager : MonoBehaviour
public void OnPlayButtonClicked() public void OnPlayButtonClicked()
{ {
HasStarted = true; HasStarted = true;
time = waveQueue.Peek().spawnTime;
PopWave(); PopWave();
} }
@ -63,6 +62,8 @@ public class EnemySpawnManager : MonoBehaviour
void PopWave() void PopWave()
{ {
time = 0;
Wave spawnWave = waveQueue.Dequeue(); Wave spawnWave = waveQueue.Dequeue();
for (int i = 0; i < spawnWave.groups.Length; i++) for (int i = 0; i < spawnWave.groups.Length; i++)
{ {

View File

@ -10,6 +10,7 @@ public class UITooltips : MonoBehaviour
// Not optimal but gamejam momento // Not optimal but gamejam momento
[SerializeField] private GameObject tooltip; [SerializeField] private GameObject tooltip;
[SerializeField] private EventTrigger ExtraExitCollider;
private EventTrigger uiEvents; private EventTrigger uiEvents;
public int ButtonIndex = -1; public int ButtonIndex = -1;
@ -29,6 +30,12 @@ public class UITooltips : MonoBehaviour
pointerEnter.callback.AddListener((data) => { OnEnter((PointerEventData)data); }); pointerEnter.callback.AddListener((data) => { OnEnter((PointerEventData)data); });
uiEvents.triggers.Add(pointerEnter); uiEvents.triggers.Add(pointerEnter);
// Subscribe to PointerEnter event
EventTrigger.Entry ExtraExitEnter = new EventTrigger.Entry();
ExtraExitEnter.eventID = EventTriggerType.PointerEnter;
ExtraExitEnter.callback.AddListener((data) => { OnExit((PointerEventData)data); });
ExtraExitCollider.triggers.Add(ExtraExitEnter);
// Subscribe to PointerExit event // Subscribe to PointerExit event
EventTrigger.Entry pointerExit = new EventTrigger.Entry(); EventTrigger.Entry pointerExit = new EventTrigger.Entry();
pointerExit.eventID = EventTriggerType.PointerExit; pointerExit.eventID = EventTriggerType.PointerExit;