Patterns to use in DragonRuby
Input Actions
From Input Actions
Go to text ā
Instead of using args.inputs
directly you parse it into an input actions objects, which is then used instead to
control your game.
When is it useful?
Some scenarios when this pattern can be useful:
- Having several different kinds of inputs with the same effect
- Configurable controls
- Letting an AI player control your game (character)
- Multiplayer
In general I think it results in cleaner, better organized code but YMMV of course.
Children