Thursday 4 May 2017

Outside the Box Project Alpha Work - Miscellaneous Scripts (Health, Money etc.)

Game Manager:

As our Game Manager, this script was designed to be a hub to handle most unspecialised tasks within our game, such as loading scenes, controlling when our game will start etc. and for a while even controlling the Player's money, though this would later need to be updated when I get around to implementing a proper health and damage system for our defence attacking our enemies.





Player Health:

A rather simple thing, our Player's health manager. There is an invisible trigger box that sits at the door of the Base which is, coincidentally, where the last waypoint of the enemies path is located.

This trigger box simply detects when an enemy collides with the trigger box through the enemy gameObject's tag and then reduce the numerical value of the Player's health and removes the appropriate visualisation of the Player's health on the screen.


Outpost Health:

The OutpostHealthManager operates exactly the same as the PlayerHealthManager, but controls the health of the outposts, and also, controls the paths the Enemies will take contextual to if the health of the Outposts has reached 0. Should the outpost health reach 0, then the paths of the enemies will switch to the Player's main base.


Main Menu Controls:

Like the Game Manager, the Main Menu Controls script handles the nitty gritty of the mechanics required of the main menu scene. However it is also the only script in the main menu as all that needs to be controlled is the loading of scenes and the playing of animations.



No comments:

Post a Comment