Advertisement
NeoGriever

Untitled

Jun 29th, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. var Random = 0; // rr
  2. var Strength = 0; // rs
  3. onBounce () { // #
  4. Random = rnd(-0.5, 0.5);
  5. }
  6. onLaunch () { // *
  7. Strength = Random(40, 150);
  8. }
  9. onFrame () {
  10. Strength -= 1; // Vereinfacht
  11. Power = Strength * Random;
  12. Result += Power;
  13. }
  14.  
  15. Beispielwerte:
  16. |---|----------|--------|-------|--------|
  17. | | Strength | Random | Power | Result |
  18. |---|----------|--------|-------|--------|
  19. | * | > 150 | 0.0 | 0,0 | 0 | // Launch
  20. | # | 149 | > 0.3 | 44,7 | 44,7 | // Bounce
  21. | | 148 | 0.3 | 44,4 | 89,1 |
  22. | | 147 | 0.3 | 44,1 | 133,2 |
  23. | | 146 | 0.3 | 43,8 | 177,0 |
  24. | | 145 | 0.3 | 43,5 | 220,5 |
  25. | # | 144 | > -0.1 | -14,4 | 206,1 | // Bounce
  26. | | 143 | -0.1 | -14,3 | 191,8 |
  27. | | 142 | -0.1 | -14,2 | 177,6 |
  28. | | 141 | -0.1 | -14,1 | 163,5 |
  29. | | 140 | -0.1 | -14,0 | 149,5 |
  30. | # | 139 | > 0.2 | 27,8 | 177,3 | // Bounce
  31. | | 138 | 0.2 | 27,6 | 204,9 |
  32. | | ... | ... | ... | ... |
  33. |___|__________|________|_______|________|
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement