Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function bouncyPlatform(x, y, z, w, h, d, color) {
- platform3D(x, y, z, w, h, d, color);
- if (player.pos[0] >= x && player.pos[0] <= x+w && player.pos[1] >= y && player.pos[1] <= y+h && player.vel[2] > 0 && player.pos[2] + player.vel[2] > (z-1)) {
- player.vel[2] = -player.vel[2] - 0.05;
- }
- }
- platform3D(-50, -50, 0, 100, 100, 3, color(0, 255, 0, 1));
- platform3D(0, 40, -8, 10, 10, 1, color(0, 255, 0, 1));
- platform3D(0, 40, -16, 10, 10, 1, color(0, 255, 0, 1));
- platform3D(0, 40, -24, 10, 10, 1, color(0, 255, 0, 1));
- platform3D(0, 40, -32, 10, 10, 1, color(0, 255, 0, 1));
- platform3D(0, 180, -32, 10, 10, 1, color(0, 255, 0, 1));
- bouncyPlatform(-50, 50, 0, 100, 100, 3, color(0, 0, 255, 1));
- [["checkpoint", 0, 0, 0, false],
- ["checkpoint", 5, 185, -32, false]]
Advertisement
Add Comment
Please, Sign In to add comment