메소드 | 설명 | |
---|---|---|
CreateGame ( ) : void |
Creates a new game using its dedicated GameBuilder. A game consists of a model and its view.
|
|
Draw ( |
Draws the GameView and all its subcomponents.
|
|
GameController ( GameBuilder gameBuilder, GameHandler gameHandler ) : System |
Constructor of a GameController object.
|
|
OnCollision ( |
Reacts to a collision that happend in the game depending on the type of the two assigned WorldObjects. This method creates an explosion, reduces the health of the WorldObject, if necessary, and checks, if one of the involved world objects has to be removed from the world.
|
|
OnFire ( Spaceship shooter ) : void |
Creates a projectile and its fitting view.
|
|
Update ( FrameState frameState ) : void |
Updates the GameModel and its subcomponents.
|
메소드 | 설명 | |
---|---|---|
checkDeath ( |
public Draw ( |
||
viewPort | Defines the Viewport to usw. | |
spriteBatch | Defines the SpriteBatch to use. | |
gameTime | The frame's time object. | |
리턴 | void |
public GameController ( GameBuilder gameBuilder, GameHandler gameHandler ) : System | ||
gameBuilder | GameBuilder | Defines the GameBuilder the GameController uses. |
gameHandler | GameHandler | Defines the GameHandler the GameController uses. |
리턴 | System |
public OnCollision ( |
||
collisionObject1 | The first WorldObject, which was involved in the collision. | |
collisionObject2 | The second WorldObject, which was involved in the collision. | |
리턴 | void |
public OnFire ( Spaceship shooter ) : void | ||
shooter | Spaceship | The Spaceship which fired the projectile. |
리턴 | void |