O'Reilly logo

Collaborative Online Game Creation by Naveena Aswadhati, Nanu Swamy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the picture Object

The picture object has to perform several tasks during the mouse Click and mouse Press states. It also has to perform initialization tasks in the Create event and requires two custom states to perform other tasks. Now it’s time to create all these states for the picture object. With the picture object selected, double-click on the Create state to move it over. Then double-click the Click state and the Press state to add them to the picture object. Create a custom state named initialize by clicking the Add State button. Next, click on its empty argument list and type cw, ch. These two variables denote column width and column height, respectively. Create another custom state and name it slice. Then change its argument ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required