C# Class MyGame.MyGame

This class represent the Game that contains the main game loop and glues all components together
Inheritance: Microsoft.Xna.Framework.Game, IEvent
Show file Open project: mahmoudbahaa/XNA-Game-project Class Usage Examples

Public Properties

Property Type Description
camera Camera
cameraMode CameraMode
canPause bool
controller control.Controller
currentLevel int
difficultyConstants Helper.DifficultyConstants
gameOver bool
mediator Mediator
paused bool
player Player

Public Methods

Method Description
GetHeightAtPosition ( float X, float Z ) : float
MyGame ( ) : System
addEvent ( Helper ev ) : void
checkCollisionWithBullet ( Unit unit ) : bool
checkCollisionWithTrees ( Unit unit, int offset ) : bool
pause ( ) : void
resume ( ) : void

Protected Methods

Method Description
EndRun ( ) : void
LoadContent ( ) : void
Update ( GameTime gameTime ) : void

Private Methods

Method Description
clamp ( float h ) : float
initializeBillBoard ( int numOfBillBoards, String tex, System.Boolean EnsureOcclusion, Vector2 size, bool flag ) : BillboardSystem
initializeClouds ( ) : void
initializeCreditsScreen ( ) : void
initializeGame1 ( ) : void
initializeGame2 ( ) : void
initializeHelpScreen ( ) : void
initializePlayer ( ) : Player
initializePositions ( int numOfBillBoards, Vector2 size ) : List
initializeStartMenu ( ) : void
initializeTrees ( ) : void
intitializeSky ( ) : SkyCube

Method Details

EndRun() protected method

protected EndRun ( ) : void
return void

GetHeightAtPosition() public method

public GetHeightAtPosition ( float X, float Z ) : float
X float
Z float
return float

LoadContent() protected method

protected LoadContent ( ) : void
return void

MyGame() public method

public MyGame ( ) : System
return System

Update() protected method

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

addEvent() public method

public addEvent ( Helper ev ) : void
ev Helper
return void

checkCollisionWithBullet() public method

public checkCollisionWithBullet ( Unit unit ) : bool
unit Unit
return bool

checkCollisionWithTrees() public method

public checkCollisionWithTrees ( Unit unit, int offset ) : bool
unit Unit
offset int
return bool

pause() public method

public pause ( ) : void
return void

resume() public method

public resume ( ) : void
return void

Property Details

camera public property

public Camera,MyGame camera
return Camera

cameraMode public property

public CameraMode cameraMode
return CameraMode

canPause public property

public bool canPause
return bool

controller public property

public Controller,control controller
return control.Controller

currentLevel public property

public int currentLevel
return int

difficultyConstants public property

public DifficultyConstants,Helper difficultyConstants
return Helper.DifficultyConstants

gameOver public property

public bool gameOver
return bool

mediator public property

public Mediator,MyGame mediator
return Mediator

paused public property

public bool paused
return bool

player public property

public Player player
return Player