Ce que fait la commande
CreatePhysicsForce fait exister un objet 2DPhysics : c'est par lui que la suite du programme en a un. Il prend x (un flottant), y (un flottant), power (un flottant), limit (un flottant), range (un flottant) et fade (un entier), et rend un entier.
Syntaxe
CreatePhysicsForce(x float, y float, power float, limit float, range float, fade integer) → integerParamètres
| Nom | Type |
|---|---|
| x | float |
| y | float |
| power | float |
| limit | float |
| range | float |
| fade | integer |
Chaque forme rend
integer
Exemple · engendré
physicsForce = CreatePhysicsForce(100.0, 120.0, 1.0, 1.0, 1.0, 1)DO Sync()LOOPCreatePhysicsForce est appelé et sa réponse est affichée à chaque image. 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.