Questions tagged [callbacks]
The callbacks tag has no usage guidance.
17
questions
0
votes
1
answer
106
views
Clicking UI button calls event twice
I've designed a game where, when a button is clicked, the moving point stops. If the button is clicked again, the moving point starts moving again.
I only click on the button once, but the ...
0
votes
1
answer
125
views
How to access GameObject inside Action
I'm stuck inside an Action :
...
1
vote
1
answer
849
views
Unity InputSystem using Unity Events not maintaining values
I am testing out using the new Input System and cannot get the values from context.ReadValue<Vector2>() to pass into a private variable.
The simple setup is ...
0
votes
1
answer
917
views
1
vote
0
answers
41
views
Get return of asynchronous callback since module export- Nodejs
Server:
require('./MovimientoJugador')();
var camino4=MoverJugador(startX,startY,endX,endY,mapa2);
console.log("Camino: " + camino4);
MovimientoJugador:
...
4
votes
1
answer
2k
views
In GLUT, how do I bind an action to a press of "any key"?
Well, this sound ridiculous but the logic is escaping me. I have drawn my cube in OpenGL and I want to translate it to the right if any of the key on the keyboard is pressed. I know how to do this for ...
0
votes
1
answer
3k
views
Handling input with callback functions
I'm not sure if I understand callback functions completely - they are functions that another function calls? This seems like a powerful tool, especially w/r/t handling input.
I've written up this ...
2
votes
1
answer
528
views
Is OnMouseUp()'s behavior intended?
Version: Unity3D 4.6.2f1
I have a grid of tiles (Cube GameObjects with a Tile script attached). They are positioned at their ...
0
votes
1
answer
309
views
Collision response callback
First at all, I'm not asking how to handle or detect collision. I already have that.
My actual situation is, I have a system collision and I detect the collisions. Every collision detected is store ...
4
votes
3
answers
2k
views
Callback on Derived Class?
How does Unity3D implement their system where if a class is derived from MonoBehaviour and has certain methods like Awake() or Update(), they are called accordingly? I want to do a similar system for ...
5
votes
2
answers
3k
views
How do I create a message box that fires a callback on button press?
I need to create a message box with an "OK"-button. When the user touches the button, it should execute a callback. I'm new to this and couldn't find any articles in the docs.
1
vote
1
answer
3k
views
How do I handle collision response between many different types of game objects?
I am looking for a way to avoid the dreaded switch or if/else scenarios between numerous game object types when a collision takes place in a game. For example:
You have a list of game objects which ...
-1
votes
1
answer
1k
views
Overload C++ functions in lua [closed]
I have had a look around but I believe this to be impossible due to compile time of c++.
However is it possible to have a class registered in lua and c++ that has a overload update function which I ...
1
vote
3
answers
13k
views
Handling multiple pressed keys with KeyListeners
I'm making a game Applet with Java that uses KeyListeners to control a paddle (for a game like Breakout/Pong). My basic implementation goes like this:
...
0
votes
1
answer
710
views
Make a callback to android methods from libgdx
How can I make a callback from libgdx to an Android method? I want to use the method to overwrite a file in the internal memory.
4
votes
1
answer
281
views
How do I run a callback when all objects have stopped moving?
I'm using Bullet and want to take some action once all objects in a dynamic world have reached 0 velocity (or at least a value that's very close).
I was trying to iterate over all of them all the ...
1
vote
1
answer
4k
views
How can I cancel a contact in a b2ContactListener?
To know when contacts happen we can derive from b2ContactListener and implement our own solution which is great. I'm wondering is there anyway we can cancel a contact, that is to say when we hit begin ...