Game Development Community

ActionDelegate

by Steven Moore · in Torque X 2D · 08/24/2008 (1:03 am) · 1 replies

Can anyone please provide me a working example of using InputMap.ActionDelegate in association with a BindAction? I'm trying to do a simple menu but cannot seem to get this setup properly. Or, feel free to point me in another direction. I'm baffled at this point. The API lacks a working example and it's killing me.

#1
08/28/2008 (7:25 am)
Do you mean something like this?

_inputMap.BindAction(keyboardId, (int)Keys.Y, ToggleCamera);

public void ToggleCamera(float val) 
        { 
            if (val < 1.0f)
                return;
             // other code
        }