- Download it and run
npm install
- Run
gulp watch
ornpm start
to see it on your browser Gulp
is currently minifying css and js automatically and reloading the project on each change
- Super Dario runs/walks forever, automatically
- After you click "Play Now" an enemy will appear at the screen
- You must jump to avoid the enemy or Super Dario will get hurt
- If Super Dario is hurt, he becomes small. If he's hurt again, he dies
- To jump, press any key or tap your screen if you're on your phone
- Super Dario, the ground and the enemy move constantly through CSS animations
- When the game starts, the position of the enemy (
offsetLeft
) is constantly compared with Super Dario's position - If Super Dario and the enemy share the same offsetLeft, but Super Dario is jumping (class
.up
), Super Dario isn't hurt - If Super Dario is hurt, JS checks if he has the
.small
class. If yes, he fades (dies) and the game 'freezes' (animations stop). - If no, he becomes small by the add of the
.small
class.