C# 클래스 SmashBros.Controllers.PowerUpController

Holds and controls all powerUps on map and drops powerups at random time at random position inside the dropZone
상속: Controller
파일 보기 프로젝트 열기: Grutn/TDT4240-X2 1 사용 예제들

공개 메소드들

메소드 설명
Load ( Microsoft.Xna.Framework.Content.ContentManager content ) : void
OnCollision ( Fixture powerUpGeom, Fixture character, Contact contant ) : bool

Runs when a character collides with a powerUp

OnNext ( GameStateManager value ) : void
PowerUpController ( ScreenManager screen, Box dropZone ) : System

Constructs the powerup controller

Unload ( ) : void
Update ( GameTime gameTime ) : void
addPowerUpToMap ( ) : void

Adds new random powerup to the map insise the drop zone

비공개 메소드들

메소드 설명
RemovePowerUp ( int gotKilled ) : void
generateTimeToNext ( ) : void

Set random time until next powerUp is droped uses min and maxNew as upper & lower limitS

randomDropPosition ( ) : Vector2

Create and returns random position inside the dropZone

randomPowerUp ( ) : PowerUp

Returns random powerup from the list

메소드 상세

Load() 공개 메소드

public Load ( Microsoft.Xna.Framework.Content.ContentManager content ) : void
content Microsoft.Xna.Framework.Content.ContentManager
리턴 void

OnCollision() 공개 메소드

Runs when a character collides with a powerUp
public OnCollision ( Fixture powerUpGeom, Fixture character, Contact contant ) : bool
powerUpGeom FarseerPhysics.Dynamics.Fixture
character FarseerPhysics.Dynamics.Fixture
contant FarseerPhysics.Dynamics.Contacts.Contact
리턴 bool

OnNext() 공개 메소드

public OnNext ( GameStateManager value ) : void
value GameStateManager
리턴 void

PowerUpController() 공개 메소드

Constructs the powerup controller
public PowerUpController ( ScreenManager screen, Box dropZone ) : System
screen SmashBros.MySystem.ScreenManager
dropZone Box dropZone for powerups
리턴 System

Unload() 공개 메소드

public Unload ( ) : void
리턴 void

Update() 공개 메소드

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

addPowerUpToMap() 공개 메소드

Adds new random powerup to the map insise the drop zone
public addPowerUpToMap ( ) : void
리턴 void