Comments (4)
For now, the only way to handle input is through event listeners. If you need to bind the input to a specific class, you need to write a wrapper yourself. I am still experimenting with different approaches. What do you suggest?
from ouzel.
Sorry for the delayed response.
First, thank you for answering me!
Second, I was thinking that it would be better to handle events in the actor level.
Handling events in the scene level could be quite messy as I can see it - especially if you're going to build a whole level with it - perhaps I see it wrong, I would be more than glad to see what you have in mind about that.
from ouzel.
You can handle them in actor level by adding event callbacks to your actor or component. Sending all events to ALL actors or components is really time-consuming (iterating through all the actors in the scene and calling methods for each of them) and we don't want this.
from ouzel.
Yeah, that's a trade of - but I think readability-wise might worth it.
Good job there!
from ouzel.
Related Issues (20)
- add nanogui HOT 1
- Erroneous declaration of functions in the class SoundData HOT 5
- A lot of reallocations in vector assign a data. HOT 1
- Bug play a ogg-sound with AudioDeviceDS in a debug mode.
- WASAPI Audio backend HOT 2
- Ouzel samples don't run (Ubuntu 17.10, i3)
- syntax error : "constant" HOT 3
- [Engine init] Exclusive full screen exception HOT 1
- SetCursorPosition not working properly (?) HOT 1
- Ouzel openGL mode can't draw any content until moved/resized on macOS 10.14 HOT 3
- Ouzel reset shader uniform buffer offset at wrong place. HOT 1
- Run Sample crash by Android HOT 1
- cling based C++ as scripting language / hot code reload
- Samples crash with exception HOT 3
- kda direct buffer support HOT 4
- Rasp pi 4 compilation error HOT 2
- macOS game controller problem HOT 1
- Add a buildsystem HOT 2
- How to communicate with ObjC and Java?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ouzel.