Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var rotationDirection = 1;
- var rotationSpeed = 0;
- var rotationMultiplier = 1;
- onLaunch () {
- rotationDirection = (Rand(0, 1))?1:-1; // entweder/oder
- rotationSpeed = 0; // beim launch keine rotation
- rotationMultiplier = 1; // standard
- }
- onBounce () {
- rotationDirection = (Rand(0, 1))?1:-1; // entweder/oder
- rotationSpeed = Rand(6, 15);
- rotationMultiplier += 0.2;
- }
- onFrame () {
- rotation = rotationDirection * (rotationSpeed * rotationMultiplier);
- }
- Beispiel:
- rotation kann zwischen -15 bis -6 und 6 bis 15 sein ... da negativ/positiv separat definiert ist :D
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement