C# 클래스 Nez.Sprites.SpriteTrail

renders and fades a copy of the Sprite on the same Entity. minDistanceBetweenInstances determines how often a trail sprite is added.
상속: RenderableComponent, IUpdatable
파일 보기 프로젝트 열기: prime31/Nez

공개 프로퍼티들

프로퍼티 타입 설명
fadeDelay float
fadeDuration float
fadeToColor Color
initialColor Color
minDistanceBetweenInstances float

공개 메소드들

메소드 설명
SpriteTrail ( Sprite sprite, int maxInstances = 15 ) : System
disableSpriteTrail ( bool completeCurrentTrail = true ) : void

disables the SpriteTrail optionally waiting for the current trail to fade out first

enableSpriteTrail ( ) : SpriteTrail

enables the SpriteTrail

render ( Graphics graphics, Camera camera ) : void

비공개 메소드들

메소드 설명
IUpdatable ( ) : void
spawnInstance ( ) : void

stores the last position for distance calculations and spawns a new trail instance if there is one available in the stack

메소드 상세

SpriteTrail() 공개 메소드

public SpriteTrail ( Sprite sprite, int maxInstances = 15 ) : System
sprite Sprite
maxInstances int
리턴 System

disableSpriteTrail() 공개 메소드

disables the SpriteTrail optionally waiting for the current trail to fade out first
public disableSpriteTrail ( bool completeCurrentTrail = true ) : void
completeCurrentTrail bool If set to true complete current trail.
리턴 void

enableSpriteTrail() 공개 메소드

enables the SpriteTrail
public enableSpriteTrail ( ) : SpriteTrail
리턴 SpriteTrail

render() 공개 메소드

public render ( Graphics graphics, Camera camera ) : void
graphics Graphics
camera Camera
리턴 void

프로퍼티 상세

fadeDelay 공개적으로 프로퍼티

delay before starting the color fade
public float fadeDelay
리턴 float

fadeDuration 공개적으로 프로퍼티

total duration of the fade from initialColor to fadeToColor
public float fadeDuration
리턴 float

fadeToColor 공개적으로 프로퍼티

final color that will be lerped to over the course of fadeDuration
public Color fadeToColor
리턴 Color

initialColor 공개적으로 프로퍼티

initial color of the trail instances
public Color initialColor
리턴 Color

minDistanceBetweenInstances 공개적으로 프로퍼티

how far does the Sprite have to move before a new instance is spawned
public float minDistanceBetweenInstances
리턴 float