WaveClass - UQcsse3200/2023-studio-3 GitHub Wiki

Introduction

The WaveClass is used to handle individual waves during a level. It checks what entities are contained in a wave and counts how many mobs there are.

UML Diagram

Waves UML

Sequence Diagram

Sprint3_Sequence

Methods

entitiesToWave()

This method converts a HashMap of mobs with their quantities to a list which can be used for spawning. For example, if a wave has four xenos and five fireworms, four xenos and five fireworms will be added to the list. This list is then shuffled so that the mobs spawn in a randomised order.

getSize()

This method returns the size of an individual wave. In other words, this is the total number of mobs which are spawned in that wave.

getMobs()

This method returns the internal list storing the mobs and their order for the wave.