C# Class Manic_Shooter.ResourceManager

Exibir arquivo Open project: TheGameDevelopmentClub/Manic-Shooter

Public Methods

Method Description
AddDroppable ( IDroppable newDroppable ) : void

Adds a new droppable to the game

AddEnemy ( IEnemy newEnemy ) : void

Adds a new enemy to the game

AddPlayer ( IPlayer newPlayer ) : void

Adds a new player to the game

AddProjectile ( IProjectile newProjectile ) : void

Adds a new projectile to the game

AddRenderableObject ( IRenderable renderableObject ) : void

Adds the sprite to the spriteList

CleanUpLists ( ) : void

Cleans inactive elements from the player, enemy, projectile, and render lists. Should not be called too often as it can be expensive. This is effectively a garbage collector

RemoveDroppable ( IDroppable droppableToRemove ) : void

Removes a droppable from the list

RemoveEnemy ( IEnemy enemyToRemove ) : void

Removes an enemy from the list

RemovePlayer ( IPlayer playerToRemove ) : void

Removes a player from the list

RemoveProjectile ( IProjectile projectileToRemove ) : void

Removes a projectile from the list

RemoveRenderable ( IRenderable renderableToRemove ) : void

Removes a renderable object from the list

RenderSprites ( SpriteBatch spriteBatch ) : void

Renders the lists in the order of renderable objects, players, enemies, and the projectiles. Should be called between spriteBatch.Begin() and spriteBatch.End() calls

ResetAll ( ) : void
Update ( GameTime gameTime ) : void

Private Methods

Method Description
CheckCollisions ( ) : void
ResourceManager ( ) : System

Method Details

AddDroppable() public method

Adds a new droppable to the game
public AddDroppable ( IDroppable newDroppable ) : void
newDroppable IDroppable
return void

AddEnemy() public method

Adds a new enemy to the game
public AddEnemy ( IEnemy newEnemy ) : void
newEnemy IEnemy The new enemy to add
return void

AddPlayer() public method

Adds a new player to the game
public AddPlayer ( IPlayer newPlayer ) : void
newPlayer IPlayer The new player to add
return void

AddProjectile() public method

Adds a new projectile to the game
public AddProjectile ( IProjectile newProjectile ) : void
newProjectile IProjectile The new projectile to add
return void

AddRenderableObject() public method

Adds the sprite to the spriteList
public AddRenderableObject ( IRenderable renderableObject ) : void
renderableObject IRenderable
return void

CleanUpLists() public method

Cleans inactive elements from the player, enemy, projectile, and render lists. Should not be called too often as it can be expensive. This is effectively a garbage collector
public CleanUpLists ( ) : void
return void

RemoveDroppable() public method

Removes a droppable from the list
public RemoveDroppable ( IDroppable droppableToRemove ) : void
droppableToRemove IDroppable
return void

RemoveEnemy() public method

Removes an enemy from the list
public RemoveEnemy ( IEnemy enemyToRemove ) : void
enemyToRemove IEnemy The enemy to remove
return void

RemovePlayer() public method

Removes a player from the list
public RemovePlayer ( IPlayer playerToRemove ) : void
playerToRemove IPlayer The player to remove
return void

RemoveProjectile() public method

Removes a projectile from the list
public RemoveProjectile ( IProjectile projectileToRemove ) : void
projectileToRemove IProjectile The projectile to remove
return void

RemoveRenderable() public method

Removes a renderable object from the list
public RemoveRenderable ( IRenderable renderableToRemove ) : void
renderableToRemove IRenderable The renderableObject to remove
return void

RenderSprites() public method

Renders the lists in the order of renderable objects, players, enemies, and the projectiles. Should be called between spriteBatch.Begin() and spriteBatch.End() calls
public RenderSprites ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch The spritebatch to use for the drawingc
return void

ResetAll() public method

public ResetAll ( ) : void
return void

Update() public method

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void