O'Reilly logo

Starling Game Development Essentials by Juwal Bose

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

AiManager

The single line code given at the end of the last section just makes the WorldLayer instance render to its RenderTexture as was explained in Chapter 2, Going Isometric, but now it has another very simple looking single line of code which makes all the difference, as follows:

aiManager.step(delta);

The step method within AiManager performs the following functions:

  • Loops through the blue and green soldier vectors, removes dead soldiers, and calls the action and update methods of each live soldier
  • If any character has just come into a new tile, then it calls the checkForAxn method with that soldier
  • Loops through the blue and green bomb vectors, removes exploded bombs, and calls the action and update methods of the rest of the bombs
  • If any bomb ...

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