Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Random = 0; // rr
- var Strength = 0; // rs
- onBounce () { // #
- Random = rnd(-0.5, 0.5);
- }
- onLaunch () { // *
- Strength = Random(40, 150);
- }
- onFrame () {
- Strength -= 1; // Vereinfacht
- Power = Strength * Random;
- Result += Power;
- }
- Beispielwerte:
- |---|----------|--------|-------|--------|
- | | Strength | Random | Power | Result |
- |---|----------|--------|-------|--------|
- | * | > 150 | 0.0 | 0,0 | 0 | // Launch
- | # | 149 | > 0.3 | 44,7 | 44,7 | // Bounce
- | | 148 | 0.3 | 44,4 | 89,1 |
- | | 147 | 0.3 | 44,1 | 133,2 |
- | | 146 | 0.3 | 43,8 | 177,0 |
- | | 145 | 0.3 | 43,5 | 220,5 |
- | # | 144 | > -0.1 | -14,4 | 206,1 | // Bounce
- | | 143 | -0.1 | -14,3 | 191,8 |
- | | 142 | -0.1 | -14,2 | 177,6 |
- | | 141 | -0.1 | -14,1 | 163,5 |
- | | 140 | -0.1 | -14,0 | 149,5 |
- | # | 139 | > 0.2 | 27,8 | 177,3 | // Bounce
- | | 138 | 0.2 | 27,6 | 204,9 |
- | | ... | ... | ... | ... |
- |___|__________|________|_______|________|
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement