Step 7: Analyzing Our Shark Costumes

Goal:


Now let’s take a quick look at what we have in the Shark’s costumes.

The sprites we want to use for our damage animation are sprites 5 and 6.

Now the hard thing here is trying to find a way to decide when to use each sprite.

We could have a lot of if statements/conditions, but that would be A LOT of blocks.

Look at the right sprites, they are numbered 1 and 5, now look at the left sprites, they are numbered 2 and 6, can you see any similarities here? We’re gonna use these in the next step.

Steps:

  1. Click on the “Costumes” tab for the “Sharky” sprite.
  2. Take a look at all the Shark costumes, especially numbered 1 and 5, and 2 and 6.

Code: