-
Notifications
You must be signed in to change notification settings - Fork 9
EPIC: Player Interaction
TODO: Document Player Stats System
TODO: Document Player Hook
TODO: Document Weapon Hook
Requirements
Requirements:
-
Configurable projectiles (Should be Scriptable Objects). Configurable attributes:
- Sprite
- Damage
- Speed
- Penetration (number of enemies the projectile can pass through before disappearing)
-
Projectiles are launched by the initiaing script (Enemy Attack Ranged, or Weapon Ranged Controller).
-
Damage is applied to enemy target's Character Health component upon collision.
Version 1.0
Dependencies:
- Object Pooler (optional)
- Projectile
Methods:
- None
Events:
- None
Configurable Fields:
- Projectile Sprite
- Damage
- Falloff Time (lifetime of projectiels before disappearing)
- Max Hits (maximum number of enemies a projectile can hit before disappearing)
- Projectile Speed
- Projectile Prefab
- Layer (layer on which the projectile should be instantiated. i.e. Player Projectile)
Weapon Ranged Controller listens for player input (currently the left mouse button). On player input a projectile is pulled from the Object Pooler and configured, placed on the correct layer, then launched.
Note: In this project, the Weapon Hook configures most of the fields for this class.
Dependencies:
- None
Methods:
- Remove Target
Events:
- None
Configurable Fields:
- Damage
Weapon Melee Controller contains a trigger collider that adds any GameObjects with a Character Health component to a list. Additionally, Weapon Melee Controller subscribes to any Character Health component's UnTarget events. This is so that the controller can recognize when an enemy is no longer targetable (dead, disabled, destroyed). When an enemy leaves the trigger collider or dies, it is removed from the targetable list and the subscription to the UnTarget event is removed.
On player input (currently the left mouse button), a new array is created from this list of targetable Character Healths and iterated calling TakeDamage() for each target. The reason a new array is created is due to the possibility that an enemy dies from damage during the iteration. If an enemy dies from damage, UnTarget subscriber methods are invoked. This results in an immediate change to the list of targetable characters, which will result in errors (you cannot change a list while iterating it).
Note: In this project, the Weapon Hook configures most of the fields for this class.
TODO: Migrate pausing to a singleton GameState manager to allow more complex pausing functionality
Requirements
**Requirements:**- Ability to stop game time through event trigger.
Time is paused when opening the inventory by setting Time.timeScale = 0. Time is unpaused by setting it back to Time.timeScale = 1.
It is important that all game logic be based on time (coroutines with a WaitForSeconds aspect), or utilize Unity's physics systems.
Requirements
**Requirements:**- UI menu with Grid-based slots
- Dynamically load slots with player inventory
- Ability to equip or unequip inventory
This menu system was created with significant inspiration from Brackey's inventory video. I do not take credit for this: https://www.youtube.com/watch?v=w6_fetj9PIw
Requirements:
- Ability to upgrade player's stats further for in-game currency.
- Serialize upgrade stats to a file on change.
Script Documentation
General Scripts
Generic Character Scripts
Enemy Scripts
Player Scripts
Erik's ongoing laundry list of TODOs that he doesn't want to create issues for