C# 클래스 PrinceGame.MenuScreen

상속: GameScreen
파일 보기 프로젝트 열기: salvadorc17/Prince-Monogame 1 사용 예제들

공개 메소드들

메소드 설명
Draw ( GameTime gameTime ) : void

Draws the menu.

HandleInput ( GameTime gameTime, InputState input ) : void

Responds to user input, changing the selected entry and accepting or cancelling the menu.

MenuScreen ( string menuTitle ) : System

Constructor.

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

Updates the menu.

보호된 메소드들

메소드 설명
OnCancel ( PlayerIndex playerIndex ) : void

Handler for when the user has cancelled the menu.

OnCancel ( object sender, PlayerIndexEventArgs e ) : void

Helper overload makes it easy to use OnCancel as a MenuEntry event handler.

OnSelectEntry ( int entryIndex, PlayerIndex playerIndex ) : void

Handler for when the user has chosen a menu entry.

UpdateMenuEntryLocations ( ) : void

Allows the screen the chance to position the menu entries. By default all menu entries are lined up in a vertical list, centered on the screen.

메소드 상세

Draw() 공개 메소드

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

HandleInput() 공개 메소드

Responds to user input, changing the selected entry and accepting or cancelling the menu.
public HandleInput ( GameTime gameTime, InputState input ) : void
gameTime Microsoft.Xna.Framework.GameTime
input InputState
리턴 void

MenuScreen() 공개 메소드

Constructor.
public MenuScreen ( string menuTitle ) : System
menuTitle string
리턴 System

OnCancel() 보호된 메소드

Handler for when the user has cancelled the menu.
protected OnCancel ( PlayerIndex playerIndex ) : void
playerIndex PlayerIndex
리턴 void

OnCancel() 보호된 메소드

Helper overload makes it easy to use OnCancel as a MenuEntry event handler.
protected OnCancel ( object sender, PlayerIndexEventArgs e ) : void
sender object
e PlayerIndexEventArgs
리턴 void

OnSelectEntry() 보호된 메소드

Handler for when the user has chosen a menu entry.
protected OnSelectEntry ( int entryIndex, PlayerIndex playerIndex ) : void
entryIndex int
playerIndex PlayerIndex
리턴 void

Update() 공개 메소드

Updates the menu.
public Update ( GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen ) : void
gameTime Microsoft.Xna.Framework.GameTime
otherScreenHasFocus bool
coveredByOtherScreen bool
리턴 void

UpdateMenuEntryLocations() 보호된 메소드

Allows the screen the chance to position the menu entries. By default all menu entries are lined up in a vertical list, centered on the screen.
protected UpdateMenuEntryLocations ( ) : void
리턴 void