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—creating a subclass for a 3D meteor

Now, we are going to create a specialized subclass of Actor (Balder.Core.Runtime.Actor) to define a meteor. Each meteor will be a 3D character.

  1. Stay in the 3DInvadersSilverlight project.
  2. Create a new class—Meteor (a subclass of Actor)—using the following declaration:
    public class Ufo : Actor
    
  3. Add the following lines of code at the beginning (as we are going to use many classes and interfaces from Balder and Farseer Physics Engine):
    using Balder.Core; using Balder.Core.Geometries; using Balder.Core.Math; using Balder.Core.Runtime; using FarseerGames.FarseerPhysics; using FarseerGames.FarseerPhysics.Collisions; using FarseerGames.FarseerPhysics.Dynamics; using FarseerGames.FarseerPhysics.Factories; ...

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