reworking camera and collisions, new feature from pre-jam : entities behaviour


reworking camera and collisions, new feature from pre-jam : entities behaviour, "falling" or "moving right" is now a generic function that can apply to any element !

if (!element.sprite.canvas.collide(ground, element.sprite.name, 0, 1)) { 
    element.falling = true; 
    element.move(0, 1, 'falling');
} else { 
    element.falling = false; 
}

Get Joan Jump

Leave a comment

Log in with itch.io to leave a comment.