프로퍼티 | 타입 | 설명 | |
---|---|---|---|
projectileObjects | List |
||
scrollingObjects | List |
메소드 | 설명 | |
---|---|---|
CreateBoss ( BossType enemyType, Vector2 position ) : ScrollingShooter.Boss | ||
CreateEnemy ( EnemyType enemyType, Vector2 position ) : Enemy |
Factory method for spawning enemies.
|
|
CreateExplosion ( uint colliderID ) : ScrollingShooter.Explosion |
Factory method for creating an explosion
|
|
CreateExplosion2 ( uint colliderID, float scale ) : ScrollingShooter.Explosion2 |
Factory method for creating an explosion
|
|
CreatePlayerShip ( PlayerShipType PlayerShipType, Vector2 position ) : |
Factory method to create a Player ship
|
|
CreatePowerup ( PowerupType powerupType, Vector2 position ) : ScrollingShooter.Powerup |
Factory method for spawning a projectile
|
|
CreateProjectile ( ProjectileType projectileType, Vector2 position ) : ScrollingShooter.Projectile |
Factory method for spawning a projectile
|
|
CreateProjectile ( ProjectileType projectileType, Vector2 position, Vector2 velocity ) : ScrollingShooter.Projectile |
Factory method for spawning a projectile
|
|
CreateShield ( ShieldType shieldType, Vector2 position, |
Factory method for spawning a shield
|
|
DestroyObject ( uint id ) : ScrollingShooter.GameObject |
Removes the indicated game object from the game
|
|
Draw ( float elapsedTime, |
Draws all game Objects
|
|
GameObjectManager ( Microsoft.Xna.Framework.Content.ContentManager content ) : System |
Constructs a new GameObjectManager instance
|
|
GetObject ( uint id ) : ScrollingShooter.GameObject |
Returns the GameObject instance corresponding to the specified game object id
|
|
QueryRegion ( |
Queries a rectangular region and retuns game object ids for all game objects within that region
|
|
Reset ( |
Clear all of the Queues, lists, and Dictionarys and readd the Player This reloads the level while maintaining the player's score, lives, and powerups.
|
|
Update ( float elapsedTime ) : void |
Updates the GameObjectManager, and all objects in the game
|
|
UpdateGameObject ( uint gameObjectID ) : void |
Updates the position of a GameObject within the axis lists
|
메소드 | 설명 | |
---|---|---|
AddGameObject ( ScrollingShooter.GameObject gameObject ) : void |
Helper method that adds a GameObject to the GameObjectManager
|
|
InsertBoundIntoAxis ( List |
Inserts a new bound into an axis list. The list is assumed to be sorted, so the method uses binary insertion for speed.
|
|
NextID ( ) : uint |
Helper method that provides the next unique game object ID
|
|
QueueGameObjectForCreation ( ScrollingShooter.GameObject go ) : void |
Helper method for enqueueing our game object for creation at the start of the next update cycle.
|
|
RemoveGameObject ( ScrollingShooter.GameObject gameObject ) : void |
Removes a Game object from the axis
|
|
UpdateAxisLists ( ) : void |
Sorts the axis using insertion sort - provided the list is already nearly sorted, this should happen very quickly
|
public CreateBoss ( BossType enemyType, Vector2 position ) : ScrollingShooter.Boss | ||
enemyType | BossType | |
position | Vector2 | |
리턴 | ScrollingShooter.Boss |
public CreateEnemy ( EnemyType enemyType, Vector2 position ) : Enemy | ||
enemyType | EnemyType | The type of enemy to spawn |
position | Vector2 | The location to spawn the enemy |
리턴 | Enemy |
public CreateExplosion ( uint colliderID ) : ScrollingShooter.Explosion | ||
colliderID | uint | The source of the explosion |
리턴 | ScrollingShooter.Explosion |
public CreateExplosion2 ( uint colliderID, float scale ) : ScrollingShooter.Explosion2 | ||
colliderID | uint | The source of the explosion |
scale | float | The scale of the explosion |
리턴 | ScrollingShooter.Explosion2 |
public CreatePlayerShip ( PlayerShipType PlayerShipType, Vector2 position ) : |
||
PlayerShipType | PlayerShipType | The type of Player ship to create |
position | Vector2 | The position of the Player ship in the game world |
리턴 |
public CreatePowerup ( PowerupType powerupType, Vector2 position ) : ScrollingShooter.Powerup | ||
powerupType | PowerupType | |
position | Vector2 | The position of the projectile in the game world |
리턴 | ScrollingShooter.Powerup |
public CreateProjectile ( ProjectileType projectileType, Vector2 position ) : ScrollingShooter.Projectile | ||
projectileType | ProjectileType | The type of projectile to create |
position | Vector2 | The position of the projectile in the game world |
리턴 | ScrollingShooter.Projectile |
public CreateProjectile ( ProjectileType projectileType, Vector2 position, Vector2 velocity ) : ScrollingShooter.Projectile | ||
projectileType | ProjectileType | The type of projectile to create |
position | Vector2 | The position of the projectile in the game world |
velocity | Vector2 | |
리턴 | ScrollingShooter.Projectile |
public CreateShield ( ShieldType shieldType, Vector2 position, |
||
shieldType | ShieldType | The type of shield to create |
position | Vector2 | Position of the shield in the game world |
PlayerShip | The Player | |
리턴 | ScrollingShooter.Shield |
public DestroyObject ( uint id ) : ScrollingShooter.GameObject | ||
id | uint | The game object's ID |
리턴 | ScrollingShooter.GameObject |
public Draw ( float elapsedTime, |
||
elapsedTime | float | |
spriteBatch | ||
리턴 | void |
public GameObjectManager ( Microsoft.Xna.Framework.Content.ContentManager content ) : System | ||
content | Microsoft.Xna.Framework.Content.ContentManager | A ContentManager to use in loading assets |
리턴 | System |
public GetObject ( uint id ) : ScrollingShooter.GameObject | ||
id | uint | The game object's ID |
리턴 | ScrollingShooter.GameObject |
public QueryRegion ( |
||
bounds | A bounding rectangle for the region of interest | |
리턴 | uint[] |
public Update ( float elapsedTime ) : void | ||
elapsedTime | float | The time between this and the previous frame |
리턴 | void |
public UpdateGameObject ( uint gameObjectID ) : void | ||
gameObjectID | uint | The ID of the game object to update |
리턴 | void |