Posts

Showing posts from February, 2019

Doing a Little Review

     Today, I worked on making a gif move. The work I am doing is a little review from last semester. If y'all can't remember, last semester I worked on making a little character move north, south, east, and west. I enjoyed working on my gif move all of these directions. Although, Instead of a little human character, this time we are using Link (A character from the Legend of Zelda).      First I started with a setInterval function. This function held the if statement, that if the direction is == (== is used to compare and not to assign something) to 'right', + 1px to the character's.left attribute. The 1px means to add 1px to where Link is located on the canvas. For example, if Link is assigned '200px' to the left attribute, which is otherwise the x-axis; then adding 1px makes it so the '200px' will keep increasing by one. This means the character will start to move to the right. To make Link go left, one just needs to add -1px . If one wan...