C# Class SunsetHigh.PopInOutSprite

An extension of SmoothMovingSprite that is designed to move on and off screen between two (generally static) points. Handles transitions during moving transitions (i.e. popping out while popping in and vice-versa) with ease. Used for menu components.
Inheritance: SmoothMovingSprite
Exibir arquivo Open project: ErraticUnicorn/MOSH

Public Methods

Method Description
PopInOutSprite ( ) : System
PopInOutSprite ( int x, int y ) : System
PopInOutSprite ( int x, int y, int width, int height ) : System
getAppearX ( ) : int
getAppearY ( ) : int
getHideX ( ) : int
getHideY ( ) : int
getPopDuration ( ) : float
isHiding ( ) : bool
isInFocus ( ) : bool
isMovingIn ( ) : bool
isMovingOut ( ) : bool
popIn ( ) : void
popOut ( ) : void
setAppearX ( int x ) : void
setAppearY ( int y ) : void
setHideX ( int x ) : void
setHideY ( int y ) : void
setPopDuration ( float time ) : void
setPopLocations ( int hideX, int hideY, int appearX, int appearY ) : void
update ( float elapsed ) : void

Protected Methods

Method Description
updateOffsets ( object sender, CameraOffsetEventArgs e ) : void

Used for listening to camera offset update events, so the sprite stays in a constant position on screen whenever the character moves (giving the appearance of a HUD)

Method Details

PopInOutSprite() public method

public PopInOutSprite ( ) : System
return System

PopInOutSprite() public method

public PopInOutSprite ( int x, int y ) : System
x int
y int
return System

PopInOutSprite() public method

public PopInOutSprite ( int x, int y, int width, int height ) : System
x int
y int
width int
height int
return System

getAppearX() public method

public getAppearX ( ) : int
return int

getAppearY() public method

public getAppearY ( ) : int
return int

getHideX() public method

public getHideX ( ) : int
return int

getHideY() public method

public getHideY ( ) : int
return int

getPopDuration() public method

public getPopDuration ( ) : float
return float

isHiding() public method

public isHiding ( ) : bool
return bool

isInFocus() public method

public isInFocus ( ) : bool
return bool

isMovingIn() public method

public isMovingIn ( ) : bool
return bool

isMovingOut() public method

public isMovingOut ( ) : bool
return bool

popIn() public method

public popIn ( ) : void
return void

popOut() public method

public popOut ( ) : void
return void

setAppearX() public method

public setAppearX ( int x ) : void
x int
return void

setAppearY() public method

public setAppearY ( int y ) : void
y int
return void

setHideX() public method

public setHideX ( int x ) : void
x int
return void

setHideY() public method

public setHideY ( int y ) : void
y int
return void

setPopDuration() public method

public setPopDuration ( float time ) : void
time float
return void

setPopLocations() public method

public setPopLocations ( int hideX, int hideY, int appearX, int appearY ) : void
hideX int
hideY int
appearX int
appearY int
return void

update() public method

public update ( float elapsed ) : void
elapsed float
return void

updateOffsets() protected method

Used for listening to camera offset update events, so the sprite stays in a constant position on screen whenever the character moves (giving the appearance of a HUD)
protected updateOffsets ( object sender, CameraOffsetEventArgs e ) : void
sender object
e CameraOffsetEventArgs
return void