Placing and moving the cannon
We are shooting bubbles with the cannon, so it will be the first thing to be added in the game.
The idea: The cannon must be placed in the bottom of the screen, in the middle of the game field. Players will be able to rotate it with LEFT and RIGHT arrow keys.
The development: Before we start coding we have to create
puzzlebobble.fla, create a new file and from New Document window select ActionScript 3.0 Class. Save this file as
Main.as in the same path you saved
At this time we'll also import all required classes, like
I am going to store into two constants the rotation speed of the cannon and the radius of the bubbles, as I know I'll be using these ...