O'Reilly logo

3D Game Development with Microsoft Silverlight 3 Beginner's Guide by Gastón C. Hillar

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

Time for action—adding an Actor with skeletons and bones to the game

Now we are going to add the Robot as an actor to our existing game:

  1. Stay in the project 3DInvadersSilverlight.
  2. Open InvadersGame.cs.
  3. Add the following private variable in the public class InvadersGame: RealTimeGame, to hold the new Robot instance:
    private Robot _robot1;
    
  4. Add the following lines of code before the end of the Initialize method to create a Robot instance and add this complex actor to the game:
    _robot1 = new Robot(this, Scene);
    AddActor(_robot1);
    
  5. Build and run the solution. The default web browser will appear displaying the strange robot on the left part of the scene, as shown in the following screenshot:
  6. Move the camera to see the robot from different angles while the ...

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