Aura Code Logic - UQdeco2800/2022-studio-2 GitHub Wiki
Back to Combat Items Contents Page
Defining the Auras
In order to define the auras, a JSON file was created to store the stat values as seen below.
The aura stats will then be parsed through the BaseAuraConfig classes within the CombatItemsConfig. These files can be found through the following link - source/core/src/main/com/deco2800/game/entities/configs/CombatItemsConfig/BaseAuraConfig.java
Screenshot of BaseAuraConfig file
Screenshot of the generic aura
Implmenting the Auras into the game
The type and stats of the auras within the config files will be sent into the AuraFactory class before being read by the FileLoader.readClass() method shown below. This file can be found through source/core/src/main/com/deco2800/game/entities/factories/AuraFactory.java.
FileLoader.readClass()
The types of weapons in the config files can be created with the different create()
methods for each weapon type in the AuraFactory class. The different types of aura creation methods will call the base aura creator method to create a base aura entity. Following this, different component add-ons will be placed onto the Weapon Entity.
Weapon Stats Components
Please refer to Weapons Code logic for Weapon Stats components
Aura Applier
Please refer to Weapons Code logic for Aura Applier
UML Diagram
Back to Combat Items Contents Page
Author
- Caleb Ang
- GitHub: PurrplePandaa
- Discord: Annyeong Haseyo#8083
- Slack: Caleb Ang