C# Класс Gears.Navigation.Old_MenuState

MenuState rev.005 Abstract class, intended to be inherited from and then instantiated with constructor parameters. Every MenuState is a Menu, and contains a MenuItemCollection, which is simply a collection of possible MenuStates for use in the MenuState/Engine logic. To avoid feature creep, this revision does not include parameterized fonts or font sizes or window sizes. This is done on purpose and can easily be refactored in on a later revision.
Наследование: Gears.Navigation.MenuReadyGameState
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
menuFont Microsoft.Xna.Framework.Graphics.SpriteFont
menuItemFont Microsoft.Xna.Framework.Graphics.SpriteFont

Открытые методы

Метод Описание
Draw ( SpriteBatch spriteBatch ) : void
Old_MenuState ( string menuText, IMenuItem menuItemList ) : System.Collections.Generic
Old_MenuState ( string menuText, List menuItemList ) : System.Collections.Generic
Update ( GameTime gameTime ) : void

Защищенные методы

Метод Описание
DrawMenu ( SpriteBatch spriteBatch ) : void

Contains abstract Draw logic for the Menu.

Приватные методы

Метод Описание
ActivateState ( ) : void

Contains logic that should be fired every time the state becomes active. This should fire especially in cases where the state had become inactive and then regains activity once again.

InactivateState ( ) : void

Contains logic that should be fired every time the state becomes inactive. This was originally implemented to avoid function pointers AKA delegates from firing out of the Master.stack order.

Initialize ( string menuText ) : void
KeyDown ( KeyboardState &currentKeyboardState, KeyboardState &oldKeyboardState ) : void

Event based Input hook for MenuState.

LoadContent ( ) : void
PushActiveMenuIndex ( ) : void

Called when a user presses Enter on a specific Menu Item.

UpdateInput ( GameTime gameTime ) : void

Only should be run if the state is active.

Описание методов

Draw() публичный Метод

public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
Результат void

DrawMenu() защищенный Метод

Contains abstract Draw logic for the Menu.
protected DrawMenu ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
Результат void

Old_MenuState() публичный Метод

public Old_MenuState ( string menuText, IMenuItem menuItemList ) : System.Collections.Generic
menuText string
menuItemList IMenuItem
Результат System.Collections.Generic

Old_MenuState() публичный Метод

public Old_MenuState ( string menuText, List menuItemList ) : System.Collections.Generic
menuText string
menuItemList List
Результат System.Collections.Generic

Update() публичный Метод

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void

Описание свойств

menuFont защищенное свойство

protected SpriteFont,Microsoft.Xna.Framework.Graphics menuFont
Результат Microsoft.Xna.Framework.Graphics.SpriteFont

menuItemFont защищенное свойство

protected SpriteFont,Microsoft.Xna.Framework.Graphics menuItemFont
Результат Microsoft.Xna.Framework.Graphics.SpriteFont