I’m wondering what approaches there are to creating an attack system. Let me start by defining attack system (in my game at least):
- Creates the attacks based on player inputs (player wants to shoot a bullet/bomb, attack system creates the bomb entity based on player, attack type, constants, environment etc.)
- Keeps track of players abilities (like which guns, which tools etc. does the player have access to currently) - Perhaps this could be seperated into an
Right now, my
GameSessionHostedService is creating a
Attack entity with owner (the player) and attack type (basically the player input/key presses/mouse button presses etc.). I’m doing entities and not components, as I’d like to have the option of one-to-many relation (i.e. create multiple attacks simultaneously). The
AttackState sees these
Attack entities and creates the resulting attack (by creating another entity).
Does this approach make sense ? Have you guys done anything of the sorts and what considerations did you have?