Coding Standards - CoolGuy28/DungeonHoard_GAME GitHub Wiki
Using Unity 2022.1.7f1
Scripting in C#
Naming Standards
Variables: exampleVariable
Functions: ExampleFunction()
Scripts/Scenes
Global Scripts
- GameManager - Contains important game data for the player such as a list containing the party members data, a list containing currently held items and the players stamina. Also handles the transition between game scenes including a fade in fade out transition.
- DungeonHordeData - Contains important game classes that are used by other game objects. Contains the CharacterData class which holds all the variables for current health, stats, skills and conditions for a unit.
- MenuButton - Custom button scripts used by other classes to be activated.
Main Menu Scene
The beginning scene that opens when the game is started. Contains buttons to start new games, load saves, and adjust game settings.
Scripts
- MainMenuManager - Provides functionality for navigating the main menu and loads game data into the GameManager as it loads the new overworld scene.
Overworld Scene
This scene allows the player to move around the dungeon where they would encounter various enemies and chests to loot.
Scripts
- PartyObject - Controls the movement of the player party through the dungeon. Manages collision so that the battle scene would load if the player collides with an enemy. Also provides functionality to allow other party members sprites to snake behind the player.
- OverworldEnemyObject - Controls what enemies the player battles if they collide with this as well as what overworld sprite to use and whether the enemy is dead or not.
Battle Scene
This scene is where the attempts to kill the enemy team before they kill the player. When a character is downed it can be revived through healing. If all characters on the enemy team is downed the player returns to the overworld and can loot their body. If all characters on the player team are killed the player loses and is returned to the menu scene.
Scripts
- BattleManager - The main controller in this scene. Controls navigating the battle menu, turn order, selecting targets, selecting items, selecting skills, player physical attack minigame, magic attack minigame, detecting win loss conditions.
- BattleCharObject - Generated at the start by the BattleManager for each player and enemy character. Handles character data in battle displaying the characters sprites and UI such as health and status effects. Also handles the character taking damage in combat displaying the number of damage taken and updating health UI.
- Submenu Button - Used when opening a submenu such as selecting items or skills.
- BaseShooter - Generates bullethell patterns for use in the magic attack minigame.
- Bullet - Triggers damage to be taken when colliding with the player in the magic minigame.
- Projectile - Controls the speed and movement of bullet objects in the magic minigame.
- ObjectPool - Generates bullets at the start of the scene and assigns them to be used by the BaseShooter.
- GroupObject - Allows for multiple bullet objects to be moved as one in the magic minigame.
Scriptable Objects
Scripts
- Condition
- Condition_StatChange
- Condition_DOT
- Condition_Burning
- Condition_MindControl
- Item
- Item_Usable
- Item_Weapon
- Skill
- Skill_Magic
- Unit
- Unit_Player