Method | Description | |
---|---|---|
AsteroidFieldController ( System.Vector3 sectorSize ) : System |
Instantiates a new Asteroid field controller, with the size of one asteroid sector.
|
|
GetPositionByCoordinates ( int sectorX, int sectorY ) : System.Vector3 |
Gets sector position by its coordinates
|
|
GetSector ( System.Vector3 position, int §orX, int §orY ) : void |
Gets asteroid coordinates by a world position
|
|
GetSectorTypeByCoords ( int sectorX, int sectorY ) : int |
Gets sector type by its coordinates
|
Method | Description | |
---|---|---|
Initialize ( ) : void |
Initializes the asteroid field controller
|
|
Update ( System.TimeSpan gameTime ) : void |
Update the asteroid field. If the player camera moves to a different sector, this controller must place each asteroids sectors in its correct place.
|
Method | Description | |
---|---|---|
CleanSectorList ( ) : void |
Clean the asteroid sector list.
|
|
GetFreeSteroidSector ( int sectorType, int lod ) : |
Get a free asteroid sector.
|
|
Refresh ( ) : void |
Refresh the asteroid field.
|
public AsteroidFieldController ( System.Vector3 sectorSize ) : System | ||
sectorSize | System.Vector3 | The size of one asteroid sector |
return | System |
public GetPositionByCoordinates ( int sectorX, int sectorY ) : System.Vector3 | ||
sectorX | int | X coord. |
sectorY | int | Y coord. |
return | System.Vector3 |
public GetSector ( System.Vector3 position, int §orX, int §orY ) : void | ||
position | System.Vector3 | Position in world space |
sectorX | int | X coord. |
sectorY | int | Y coord. |
return | void |
public GetSectorTypeByCoords ( int sectorX, int sectorY ) : int | ||
sectorX | int | X coord. |
sectorY | int | Y coord. |
return | int |
protected Update ( System.TimeSpan gameTime ) : void | ||
gameTime | System.TimeSpan | |
return | void |