Game Development Reference
In-Depth Information
4.
Let's get back to our Main function now:
public function Main() {
world=new b2World(new b2Vec2(0,5),true);
debugDraw();
brick(275,435,30,30);
brick(365,435,30,30);
brick(320,405,120,30);
brick(320,375,60,30);
brick(305,345,90,30);
brick(320,300,120,60);
addEventListener(Event.ENTER_FRAME,updateWorld);
}
From the first to the last brick call, we have built the left basement, the right
basement, and then the remaining bricks from bottom to top, respectively.
5.
Test your movie.
Totem Destroyer: Gabriel Ochsenhofer ( www.gabs.tv )
I think you should be quite happy with it, as you have learned to build your first
totem, ready to host the idol on top of it.
Before we add the floor and make the totem dynamic, I want you to think about
the idol.
What if we want the idol to have a shape that is different than boxes and circles?
 
Search WWH ::




Custom Search