Skip to content
Nick Stapleton edited this page Jun 11, 2019 · 33 revisions

Game States

Start Menu

TODO DAVID

Sub Menus

TODO DAVID

Main Game Loop

Death & Respawn

GeoObject.cs all geo objects have a health variable-

public void Update()
{
    // ...
    if (health <= 0)
    {
        GameObject spawner = GameObject.FindWithTag("Spawner");
        spawner.GetComponent<DotSpawner>().Kill(this.gameObject, lastHitBy);
    }
    // ...
}

For more on the spawner see DotSpawner.cs.

AI Spawn

The spawner keeps track of how many AI are alive in a list. If that amount is less than a certain amount it spawns another variable.

void Update()
{
    Lottery(1000f);

    if(Alive.Count < NumDots)
    {
        Spawn();
    }
}
Kill Tracking

Controllers

The player controller script that handles user input and stuff.

This is a basic AI controller for a Dot object.

The abstact interface that handles all AI logic. More functions should be added here if we ant the AI to do more special things.

This interface controls all behaviour for AI. To make an AI, define it's Action functions and call them successively in Update().

This is the base interface for all geometric objects in the game, ie all AI and the player.

This bad boy is attached to a GameObject, sits there, and waits to be called in DotSpawner.Kill() when an AI dies.

This acts as a programatic spawner for all Projectiles.

This interface handles the spawning for all AI

Each piece of geometry has a weapon, think of player in Call of Duty has a gun.

Location: Scripts/Geos/Shield.cs

Location: Scripts/Terrain/planeCollision.cs

Clone this wiki locally