bugfixes, formatted code

This commit is contained in:
Mottributo 2023-03-23 16:46:18 +03:00
parent a813bbb804
commit f460141ff0

View File

@ -165,7 +165,7 @@ function startGame(full_start, update_objects) {
if (i == 0) { if (i == 0) {
collectables[0] = { collectables[0] = {
x: 600, x: 600,
y: floorPos_y, y: gameChar.possibleGroundPosY[0],
size: 75, size: 75,
isFound: false, isFound: false,
}; };
@ -556,7 +556,10 @@ function drawCanyon(t_canyon) {
function drawCollectable(t_collectable) { function drawCollectable(t_collectable) {
push(); push();
// animating the coin's jiggle // animating the coin's jiggle
a = 0.1; b = 3; c = 0.2; d = 2; // a - vert. intensity, c - hor. intensity, b - vert. speed, d - hor. speed a = 0.1;
b = 3;
c = 0.2;
d = 2; // a - vert. intensity, c - hor. intensity, b - vert. speed, d - hor. speed
t_collectable.y -= sin(frameCount * a) * b; t_collectable.y -= sin(frameCount * a) * b;
t_collectable.x += sin(frameCount * c) * d; t_collectable.x += sin(frameCount * c) * d;
stroke(0.2); stroke(0.2);