Ce que fait la commande
CreatePulleyJoint fait exister un objet 2DPhysics : c'est par lui que la suite du programme en a un. Il prend jointID (un entier), spriteID1 (un entier), spriteID2 (un entier), gnd1x (un flottant), gnd1y (un flottant), gnd2x (un flottant), gnd2y (un flottant), a1x (un flottant), a1y (un flottant), a2x (un flottant), a2y (un flottant), ratio (un flottant) et colConnected (un entier), et ne rend rien. jointID est l'identifiant que vous donnez à un objet Joint : c'est ce numéro qui le désignera ensuite.
Syntaxe
CreatePulleyJoint(jointID integer, spriteID1 integer, spriteID2 integer, gnd1x float, gnd1y float, gnd2x float, gnd2y float, a1x float, a1y float, a2x float, a2y float, ratio float, colConnected integer)Paramètres
| Nom | Type |
|---|---|
| jointID | integer |
| spriteID1 | integer |
| spriteID2 | integer |
| gnd1x | float |
| gnd1y | float |
| gnd2x | float |
| gnd2y | float |
| a1x | float |
| a1y | float |
| a2x | float |
| a2y | float |
| ratio | float |
| colConnected | integer |
Chaque forme rend
rien
Exemple · engendré
CreatePulleyJoint(1, 1, 1, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1)DO Sync()LOOPCreatePulleyJoint est appelé avec des valeurs du type que sa signature réclame. La boucle DO … LOOP n'est pas décorative : un programme BASIC classique s'arrête dès qu'il n'a plus de lignes, et c'est Sync() qui dessine l'image.