C# 클래스 FlatRedBall.Sprite

상속: FlatRedBall.PositionedObject
파일 보기 프로젝트 열기: vchelaru/FlatRedBall 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
mCursorSelectable bool

Private Properties

프로퍼티 타입 설명
CollideAgainst bool
CollideAgainst bool
CollideAgainst bool
CollideAgainst bool
CollideAgainstMove bool
CollideAgainstMove bool
CopyCustomBehaviorFrom void
IMouseOver bool
OnCustomBehavior void
OnRemove void
PlatformSpecificInitialization void
SetAnimationChain void
SetCollision void
SetCollision void
SetCollision void
SetCollision void
UpdateColorsAccordingToAlpha void
UpdateFrameBasedOffOfTimeIntoAnimation void
UpdateScale void
UpdateTimeBasedOffOfAnimationFrame void
UpdateVertices void

공개 메소드들

메소드 설명
AnimateSelf ( double currentTime ) : void

Performs the every-frame logic for updating the current AnimationFrame index. If the Sprite is part of the SpriteManager then this is automatically called.

ClearAnimationChains ( ) : void

Clears all references to AnimationChains and sets the Animate property to false.

ClearCollision ( ) : void
Clone ( ) : Sprite

Returns a clone of this instance.

Attachments are not cloned. The new clone will not have any parents or children.

CloneForRig ( ) : Sprite
ForceUpdateDependenciesDeep ( ) : void
GetAnimationInformation ( ) : string
Initialize ( ) : void
Initialize ( bool initializeListsBelongingTo ) : void
IsMouseOver ( Cursor cursor, Layer layer ) : bool
Pause ( FlatRedBall instructions ) : void
RemoveAnimationChain ( AnimationChain chainToRemove ) : void

Removes the AnimationChain from the Sprite's internal AnimationChain List.

If the chainToRemove is also the CurrentChain, the animate field is set to false.

SetAnimationChain ( AnimationChain chainToSet ) : void

Sets the argument chainToSet as the animationChain. If the argument chainToSet is not part of the Sprite's internal list of AnimationChains, it is added.

This differs from FlatRedBall MDX - this method on FlatRedBall MDX does not add the argument AnimationChain to the Sprite's internal list.

This does not set any animation-related properties, but it does set the current texture to the current frame's texture. Therefore, it is still necessary to set Animate to true.

SetAnimationChain ( AnimationChain chainToSet, double timeIntoAnimation ) : void
SetScaleXRatioToY ( ) : void

Sets the ScaleY so that the ScaleX/ScaleY ratio is the same as the source image used for the Sprite's texture.

SetScaleYRatioToX ( ) : void

Sets the ScaleY so that the ScaleX/ScaleY ratio is the same as the source image used for the Sprite's texture.

Sprite ( ) : System
TimedActivity ( float secondDifference, double secondDifferenceSquaredDividedByTwo, float secondsPassedLastFrame ) : void

Applies all velocities, rates, accelerations for real and relative values. If the Sprite is part of the SpriteManager (which is common) then this is automatically called.

ToString ( ) : string
UpdateToCurrentAnimationFrame ( ) : void

비공개 메소드들

메소드 설명
CollideAgainst ( AxisAlignedRectangle axisAlignedRectangle ) : bool
CollideAgainst ( System.Line line ) : bool
CollideAgainst ( Polygon polygon ) : bool
CollideAgainst ( Sprite sprite ) : bool
CollideAgainstMove ( Polygon polygon, float thisMass, float otherMass ) : bool
CollideAgainstMove ( Sprite sprite, float thisMass, float otherMass ) : bool
CopyCustomBehaviorFrom ( Sprite spriteToCopyFrom ) : void
IMouseOver ( Cursor cursor ) : bool
OnCustomBehavior ( ) : void
OnRemove ( ) : void
PlatformSpecificInitialization ( ) : void
SetAnimationChain ( string chainToSet ) : void
SetCollision ( AxisAlignedRectangle rectangle ) : void
SetCollision ( Circle circle ) : void
SetCollision ( System.Line line ) : void
SetCollision ( Polygon polygon ) : void
UpdateColorsAccordingToAlpha ( ) : void
UpdateFrameBasedOffOfTimeIntoAnimation ( ) : void
UpdateScale ( ) : void
UpdateTimeBasedOffOfAnimationFrame ( ) : void
UpdateVertices ( Camera camera ) : void

메소드 상세

AnimateSelf() 공개 메소드

Performs the every-frame logic for updating the current AnimationFrame index. If the Sprite is part of the SpriteManager then this is automatically called.
public AnimateSelf ( double currentTime ) : void
currentTime double The number of seconds that have passed since the game has started running.
리턴 void

ClearAnimationChains() 공개 메소드

Clears all references to AnimationChains and sets the Animate property to false.
public ClearAnimationChains ( ) : void
리턴 void

ClearCollision() 공개 메소드

public ClearCollision ( ) : void
리턴 void

Clone() 공개 메소드

Returns a clone of this instance.
Attachments are not cloned. The new clone will not have any parents or children.
public Clone ( ) : Sprite
리턴 Sprite

CloneForRig() 공개 메소드

public CloneForRig ( ) : Sprite
리턴 Sprite

ForceUpdateDependenciesDeep() 공개 메소드

public ForceUpdateDependenciesDeep ( ) : void
리턴 void

GetAnimationInformation() 공개 메소드

public GetAnimationInformation ( ) : string
리턴 string

Initialize() 공개 메소드

public Initialize ( ) : void
리턴 void

Initialize() 공개 메소드

public Initialize ( bool initializeListsBelongingTo ) : void
initializeListsBelongingTo bool
리턴 void

IsMouseOver() 공개 메소드

public IsMouseOver ( Cursor cursor, Layer layer ) : bool
cursor Cursor
layer Layer
리턴 bool

Pause() 공개 메소드

public Pause ( FlatRedBall instructions ) : void
instructions FlatRedBall
리턴 void

RemoveAnimationChain() 공개 메소드

Removes the AnimationChain from the Sprite's internal AnimationChain List.
If the chainToRemove is also the CurrentChain, the animate field is set to false.
public RemoveAnimationChain ( AnimationChain chainToRemove ) : void
chainToRemove AnimationChain The AnimationChain to remove.
리턴 void

SetAnimationChain() 공개 메소드

Sets the argument chainToSet as the animationChain. If the argument chainToSet is not part of the Sprite's internal list of AnimationChains, it is added.
This differs from FlatRedBall MDX - this method on FlatRedBall MDX does not add the argument AnimationChain to the Sprite's internal list.

This does not set any animation-related properties, but it does set the current texture to the current frame's texture. Therefore, it is still necessary to set Animate to true.

public SetAnimationChain ( AnimationChain chainToSet ) : void
chainToSet AnimationChain The AnimationChain to set as the current AnimationChain. This is /// added to the internal AnimationChains property if it is not already there.
리턴 void

SetAnimationChain() 공개 메소드

public SetAnimationChain ( AnimationChain chainToSet, double timeIntoAnimation ) : void
chainToSet AnimationChain
timeIntoAnimation double
리턴 void

SetScaleXRatioToY() 공개 메소드

Sets the ScaleY so that the ScaleX/ScaleY ratio is the same as the source image used for the Sprite's texture.
public SetScaleXRatioToY ( ) : void
리턴 void

SetScaleYRatioToX() 공개 메소드

Sets the ScaleY so that the ScaleX/ScaleY ratio is the same as the source image used for the Sprite's texture.
public SetScaleYRatioToX ( ) : void
리턴 void

Sprite() 공개 메소드

public Sprite ( ) : System
리턴 System

TimedActivity() 공개 메소드

Applies all velocities, rates, accelerations for real and relative values. If the Sprite is part of the SpriteManager (which is common) then this is automatically called.
public TimedActivity ( float secondDifference, double secondDifferenceSquaredDividedByTwo, float secondsPassedLastFrame ) : void
secondDifference float The number of seocnds that have passed since last frame.
secondDifferenceSquaredDividedByTwo double Precalculated (secondDifference * secondDifference)/2.0f for applying acceleration.
secondsPassedLastFrame float The number of seconds that passed last frame for calculating "real" values.
리턴 void

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

UpdateToCurrentAnimationFrame() 공개 메소드

public UpdateToCurrentAnimationFrame ( ) : void
리턴 void

프로퍼티 상세

mCursorSelectable 보호되어 있는 프로퍼티

protected bool mCursorSelectable
리턴 bool