Penelope Tutorial: what makes the Joysticks a Joystick

Hi everyone,

I worked through the unity iPhone tutorial Penelope. One of the major remaining issues for me is, what makes "right Pad" and "left Pad" to be of type "joystick", so that the inspector and the function "FindObjectsOfType" consider them a joystick. They do not inherit form the joystick class nor is any class defined in the Jostick.js script.

(I am both: a unity and a java script beginner...)

Thanks for the effort,

Flo

Unity automatically subclasses from MonoBehaviour when you create a script. So for example, this script:

//Player.js
function Update(){
//do something cool
}

Is the same as this script:

//Player.js
class Player extends MonoBehaviour{

function Update(){
//do something cool
}

}

The only difference is that in the first example, Unity handles the class definition behind the scenes.

Regards,

-Lincoln Green