Day 35 – Jaws

This one was inspired by Keep It Straight and of course Jaws, the movie! It’s my first time using <li> elements instead of <div> elements to make rectangular shapes. One funny thing that happened was when I asked Richerd if I should incorporate selected level as a parameter for the animate function. He said something along the lines of “you don’t need to ask me, just do it” and I was thinking to myself “that means yes, I’m right, I’m smart”… and ended up typing this.

smart

Err, selectedSmart instead of selectedLevel? Not so smart after all… or just a little absent-minded. We type what we think!

I used css animation to move the bars and used mouse leave/enter to detect whether the user had entered the beginning/ending sections or touched the bars. Originally I had the play again button inside the container but this was silly as the user would keep getting “fail” as they left the game container. I moved it below instead.
fail
No matter the level, if you make it from the green to blue, you are rewarded with MC Hammer’s awesome dance moves.
win

Day 35 – Jaws

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s