- added AIBrain which can switch between Idle and Attack. Owned by ServerCharacter
- renamed Action enum to ActionType to prevent name conflicts with Action class
- gave NetworkingManager its own prefab (this is the only change to MainMenu)
- testing hack: press the "E" key on the server/host to spawn an enemy at 0,0,0
ReviveAction brings Fainted characters back to life. ServerCharacter only allows PCs to become Fainted - NPCs become dead instead.
HP <= 0 is the triggering condition for going from Alive to either Fainted or Dead. That also clears out the action queue and prevents NPC AIBrain from being updated.
This PR implements full character lifecycle with the following states:
Alive
Fainted - PCs go into this state upon reaching 0 HP
Dead - NPCs just die
Along with these states ReviveAction has been added, which restores a Fainted character back to life.
Player inputs now differentiate between friends and foes and tries to revive fainted allies on right click.
Commits have been arranged in a readable order and contain additional implementation details.
-- ActionVisualization and ActionFX base classes added.
-- MeleeActionFX logic added, and some logic to only play the hit react if the target is still in range.
-- folded "Level" into ActionRequestData. (The server takes care to sanitize the field if a request comes from the client).
-- hit detection logic has moved to a shared ActionUtils class. I wound up not making use of it in this change, but I still think it's likely this logic will need to be shared between server and client, or between different actions on the server. (It will also likely grow more complex).
-- Added a BrainEnabled switch. This is mainly intended for debugging, although it's possible it could be part of a "Stun" effect. Switch it to false to turn monsters into helpless punching bags.
-- split off some of Action into a shared ActionBase class. This is because Action and ActionFX ended up sharing several concepts.
-- Changed server-duration to match the animat...