how to define this variable input directly from script (not from editor) ?


excuse me , could i know how to define jumpTouchPad input (game object) directly from script (not from editor) ?

what changes should i apply in this script ?

if you look at speed var , i want to define jumptouchpad input like that

private var canJump = false;
var Speed:float=80;
var jumpTouchPad : Joystick;
function FixedUpdate () {
var touchPad = jumpTouchPad;
if ( !touchPad.IsFingerDown() )
            canJump = true;
         if ( canJump && touchPad.IsFingerDown() )
            canJump = true;

Thanks A lot

You can use:
var jumpTouchPad = new Joystick(constructor_arguments_here);