C# Class DeenGames.Utils.Tower.Core.TowerScreen

Our Tower framework's screen class. Makes life simpler.
Inheritance: FlatSilverBallTemplate.Screens.Screen
Show file Open project: deengames/valence Class Usage Examples

Public Methods

Method Description
Activity ( bool firstTimeCalled ) : void
AddAxisAlignedRectangle ( ) : AxisAlignedRectangle
AddAxisAlignedRectangle ( float scaleX, float scaleY ) : AxisAlignedRectangle
AddAxisAlignedRectangle ( float scaleX, float scaleY, int x, int y ) : AxisAlignedRectangle
AddSprite ( string texture ) : Sprite

Adds a sprite to our internal collection, so we don't have to clean it up manually later.

AddText ( string text ) : Text

Adds a text object to our internal collection, so we don't have to clean it up manually later.

AddText ( Text text ) : void
FadeIn ( ) : void
FadeInImmediately ( ) : void
FadeOut ( ) : void
FadeOut ( FadeOutMode mode ) : void
FadeOutHalf ( ) : void
FadeOutImmediately ( ) : void
FindText ( string displayText ) : Text

Find some text by content. This is useful because we generally create texts in Initialize, and reference them (if need be) in Activity/Update methods. Note that if there are multiple text objects, it returns the first one, depending on the order FRB stores them (usually, the one created first). If no Text object exists with the specified displayText, then we return null.

GetTopZValueAndMoveFadeToTop ( ) : float
ManageForGarbageCollection ( Object target ) : void
MoveToScreen ( Type screenType ) : void
RemoveResource ( FlatRedBall.PositionedObject p ) : void
RemoveResource ( TowerText t ) : void
TowerScreen ( ) : System

Base Screen constructor requires this. Get it done, so that we don't have to to add this to all screens.

Private Methods

Method Description
RemoveSprite ( Sprite sprite ) : void

Removes a sprite from the screen. Note that if you have a reference to this sprite, that needs to be set to null.

RemoveText ( Text text ) : void

Remove the text from the screen. Note that if you have a reference to this text, that still needs to be set to null.

Method Details

Activity() public method

public Activity ( bool firstTimeCalled ) : void
firstTimeCalled bool
return void

AddAxisAlignedRectangle() public method

public AddAxisAlignedRectangle ( ) : AxisAlignedRectangle
return AxisAlignedRectangle

AddAxisAlignedRectangle() public method

public AddAxisAlignedRectangle ( float scaleX, float scaleY ) : AxisAlignedRectangle
scaleX float
scaleY float
return AxisAlignedRectangle

AddAxisAlignedRectangle() public method

public AddAxisAlignedRectangle ( float scaleX, float scaleY, int x, int y ) : AxisAlignedRectangle
scaleX float
scaleY float
x int
y int
return AxisAlignedRectangle

AddSprite() public method

Adds a sprite to our internal collection, so we don't have to clean it up manually later.
public AddSprite ( string texture ) : Sprite
texture string
return FlatRedBall.Sprite

AddText() public method

Adds a text object to our internal collection, so we don't have to clean it up manually later.
public AddText ( string text ) : Text
text string
return FlatRedBall.Graphics.Text

AddText() public method

public AddText ( Text text ) : void
text FlatRedBall.Graphics.Text
return void

FadeIn() public method

public FadeIn ( ) : void
return void

FadeInImmediately() public method

public FadeInImmediately ( ) : void
return void

FadeOut() public method

public FadeOut ( ) : void
return void

FadeOut() public method

public FadeOut ( FadeOutMode mode ) : void
mode FadeOutMode
return void

FadeOutHalf() public method

public FadeOutHalf ( ) : void
return void

FadeOutImmediately() public method

public FadeOutImmediately ( ) : void
return void

FindText() public method

Find some text by content. This is useful because we generally create texts in Initialize, and reference them (if need be) in Activity/Update methods. Note that if there are multiple text objects, it returns the first one, depending on the order FRB stores them (usually, the one created first). If no Text object exists with the specified displayText, then we return null.
public FindText ( string displayText ) : Text
displayText string
return FlatRedBall.Graphics.Text

GetTopZValueAndMoveFadeToTop() public method

public GetTopZValueAndMoveFadeToTop ( ) : float
return float

ManageForGarbageCollection() public method

public ManageForGarbageCollection ( Object target ) : void
target Object
return void

MoveToScreen() public method

public MoveToScreen ( Type screenType ) : void
screenType System.Type
return void

RemoveResource() public method

public RemoveResource ( FlatRedBall.PositionedObject p ) : void
p FlatRedBall.PositionedObject
return void

RemoveResource() public method

public RemoveResource ( TowerText t ) : void
t DeenGames.Utils.Tower.Controls.TowerText
return void

TowerScreen() public method

Base Screen constructor requires this. Get it done, so that we don't have to to add this to all screens.
public TowerScreen ( ) : System
return System