Exemplo n.º 1
0
 /// <summary>
 /// Allows the game component to perform any initialization it needs to before starting
 /// to run.  This is where it can query for any required services and load content.
 /// </summary>
 public override void Initialize()
 {
     this.gdevice  = this.game.GraphicsDevice;
     this.camera   = this.game.Services.GetService(typeof(ICameraService)) as ICameraService;
     this.wallcube = new CubePrimitive(this.gdevice, InternalMap.GridSize);
     if (this.camera == null)
     {
         throw new InvalidOperationException("ICameraService not found.");
     }
     base.Initialize();
 }
Exemplo n.º 2
0
        public Wall(Game game, WallNode wallnode, Vector3 position)
            : base(game)
        {
            this.wall = wallnode;
            this.position = position;
            this.game = game;
            this.gdevice = this.game.GraphicsDevice;
            this.camera = this.game.Services.GetService(typeof(ICameraService)) as ICameraService;
            this.wallCube = new CubePrimitive(this.gdevice, InternalMap.GridSize);

            if (this.camera == null)
            {
                throw new InvalidOperationException("ICameraService not found.");
            }
        }
Exemplo n.º 3
0
        public Wall(Game game, WallNode wallnode, Vector3 position)
            : base(game)
        {
            this.wall     = wallnode;
            this.position = position;
            this.game     = game;
            this.gdevice  = this.game.GraphicsDevice;
            this.camera   = this.game.Services.GetService(typeof(ICameraService)) as ICameraService;
            this.wallCube = new CubePrimitive(this.gdevice, InternalMap.GridSize);

            if (this.camera == null)
            {
                throw new InvalidOperationException("ICameraService not found.");
            }
        }
Exemplo n.º 4
0
 public WayPoint(GraphicsDevice graphicDevice, Vector3 centerPos) : base(graphicDevice, WayPoint.CubeSize)
 {
     this.centerPos = centerPos;
     this.cube      = new CubePrimitive(graphicDevice, WayPoint.CubeSize);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Allows the game component to perform any initialization it needs to before starting
 /// to run.  This is where it can query for any required services and load content.
 /// </summary>
 public override void Initialize()
 {
     this.gdevice = this.game.GraphicsDevice;
     this.camera = this.game.Services.GetService(typeof(ICameraService)) as ICameraService;
     this.wallcube = new CubePrimitive(this.gdevice, InternalMap.GridSize);
     if (this.camera == null)
     {
         throw new InvalidOperationException("ICameraService not found.");
     }
     base.Initialize();
 }