Event Driven Input Handeling with Signals #9033
Closed
Mohammad9760
started this conversation in
Scripting
Replies: 1 comment 3 replies
-
Thank you for your suggestion! Closing as a duplicate of: |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
it'd be nice to be able to handle inputs without using conditionals.
so there could be a function that returns a signal for input actions that is emitted when the input is performed.
a simple example of how this can change the code:
this could instead be done like this:
there could be more parameters that enables you to get some data from this signal as well and to specify what interaction you need.
but the general idea is that you no more handle inputs with conditionals, but instead connecting functions to input action signals.
I believe it's doable in GDscript using Signals, and in C# using events.
Beta Was this translation helpful? Give feedback.
All reactions