Function 12

var arme = new lib.arme1();
var kopf = new lib.kopf2();
var body = new lib.body3();
var beine = new lib.beine1();

this.addChild(arme);
this.addChild(kopf);
this.addChild(body);
this.addChild(beine);

//eine Funktion mit 2 Argumenten
//die Werte der Argumente müssen in gleicher Reihenfolge vergeben werden
//makeRobbi(200, 300); xPos = 200, yPos = 300;
function makeRobbi(xPos, yPos) {
kopf.x = xPos;
kopf.y = yPos;
body.x = xPos;
body.y = yPos;
arme.x = xPos;
arme.y = yPos - 50;
beine.x = xPos;
beine.y = yPos + 200;
}

makeRobbi(190, 200);

zum Start / weiter