C# 클래스 TraceRacer.BackgroundScreen

The background screen sits behind all the other menu screens. It draws a background image that remains fixed in place regardless of whatever transitions the screens on top of it may be doing.
상속: GameScreen
파일 보기 프로젝트 열기: alexcoco/trace_racer 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
position int

공개 메소드들

메소드 설명
Activate ( bool instancePreserved ) : void

Loads graphics content for this screen. The background texture is quite big, so we use our own local ContentManager to load it. This allows us to unload before going from the menus into the game itself, wheras if we used the shared ContentManager provided by the Game class, the content would remain loaded forever.

BackgroundScreen ( ) : System

Constructor.

Draw ( GameTime gameTime ) : void

Draws the background screen.

Unload ( ) : void

Unloads graphics content for this screen.

Update ( GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen ) : void

Updates the background screen. Unlike most screens, this should not transition off even if it has been covered by another screen: it is supposed to be covered, after all! This overload forces the coveredByOtherScreen parameter to false in order to stop the base Update method wanting to transition off.

메소드 상세

Activate() 공개 메소드

Loads graphics content for this screen. The background texture is quite big, so we use our own local ContentManager to load it. This allows us to unload before going from the menus into the game itself, wheras if we used the shared ContentManager provided by the Game class, the content would remain loaded forever.
public Activate ( bool instancePreserved ) : void
instancePreserved bool
리턴 void

BackgroundScreen() 공개 메소드

Constructor.
public BackgroundScreen ( ) : System
리턴 System

Draw() 공개 메소드

Draws the background screen.
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
리턴 void

Unload() 공개 메소드

Unloads graphics content for this screen.
public Unload ( ) : void
리턴 void

Update() 공개 메소드

Updates the background screen. Unlike most screens, this should not transition off even if it has been covered by another screen: it is supposed to be covered, after all! This overload forces the coveredByOtherScreen parameter to false in order to stop the base Update method wanting to transition off.
public Update ( GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen ) : void
gameTime Microsoft.Xna.Framework.GameTime
otherScreenHasFocus bool
coveredByOtherScreen bool
리턴 void

프로퍼티 상세

position 공개적으로 프로퍼티

public int position
리턴 int