Star Slayer

Star Slayer is a game for an assignment that we had to make in the second period of game development. There was a theme as the assignment was called expanding space so we had to make a game about space. This was the first real team assignment we got as a class and had to make a game with a pre determent group

With this group we made a game known as Star Slayers, please note that this is the first ever real game we had to fully develop as a team with Gane Artists so please dont bash my code all to hard.


In this game enemies come at you in waves of different sizes, objective is to get as high of a score as possible. The enemies make use of a nevmesh to find the shortest path to the player


The player movement is not the most efficient thing but when I made this in the first year it worked so I didnt look back at it anymore


void Move()
{
    movementX = Input.GetAxisRaw("Horizontal");
    movementY = Input.GetAxisRaw("Vertical");

    transform.position += new Vector3(movementX, 0f) * movespeed * Time.deltaTime;
    transform.position += new Vector3(0f, movementY) * movespeed * Time.deltaTime;

}
                    

Here you see how the waves are spawned, in the Unity editor you can add waves and choose how many enemies you want to spawn per wave


    IEnumerator SpawnWave(Wave wave)
    {
        state = SpawnState.spawning;

        for (int i = 0; i < wave.count; i++)
        {
            SpawnEnemy(wave.enemy);
            yield return new WaitForSeconds(1f / wave.rate);
        }

        state = SpawnState.waiting;
        nextWave = (nextWave + 1) % waves.Length;
        waveCountDown = timeBetweenWaves;
    }