C# 클래스 geek.GameEngine.Visuals.DynamicObject

A class representing an object that can move, rotate, scale and change transparency.
상속: VisualObjectBase
파일 보기 프로젝트 열기: impworks/xna.geek.engine 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Acceleration float
Angle float
AngleShift float
AngularAcceleration float
BlendState Microsoft.Xna.Framework.Graphics.BlendState
Momentum Vector2
Pause PauseTarget
Scale float
ScaleShift float
ScaleVector Vector2?
TintColor Color
TransparencyShift float

공개 메소드들

메소드 설명
AnimateProperty ( float>.Action setter, float initial, float value, float time, InterpolationMode interpolationMode = InterpolationMode.Linear, bool animateBack = false ) : void

Animate a custom float property.

AnimateProperty ( AnimatableProperty pty, Vector2 value, float time, InterpolationMode interpolationMode = InterpolationMode.Linear, bool animateBack = false ) : void

Animate a standard vector property.

AnimateProperty ( AnimatableProperty pty, float value, float time, InterpolationMode interpolationMode = InterpolationMode.Linear, bool animateBack = false ) : void

Animate a standard float property.

AnimateProperty ( Color value, float time, InterpolationMode interpolationMode = InterpolationMode.Linear, bool animateBack = false ) : void

Animate a standard color property.

Blink ( int times, float duration ) : void

Make the object blink.

Draw ( SpriteBatch batch ) : void
IsAnimatingProperty ( AnimatableProperty pty ) : bool

Check if a property is currently being animated.

Move ( float speed, float angle ) : void

Make the object move in a given direction at a given speed.

MoveAlongCurve ( ) : void

Move an object along a bezier curve.

MoveAlongCurve ( IEnumerable points ) : void

Move an object along a bezier curve.

MoveToPoint ( Vector2 point, float time, InterpolationMode mode = InterpolationMode.Linear ) : void

Move to a specified point in a given amount of time.

MoveToPoint ( float x, float y, float time, InterpolationMode mode = InterpolationMode.Linear ) : void

Move to a specified point in a given amount of time.

MoveTowards ( Vector2 point ) : void

Move the object towards a point.

MoveTowards ( VisualObjectBase obj ) : void

Move the object towards another object.

PauseAnimatingAllProperties ( bool pause = true ) : void

Suspend all property animation until further notice.

PauseAnimatingProperty ( AnimatableProperty pty, bool pause = true ) : void

Suspend property animation until further notice.

Remove ( ) : void

Remove the object by applying fadeout effects.

Remove ( bool instantly ) : void

Remove the object.

Stop ( ) : void

Stop the object.

StopAnimatingAllProperties ( bool finish = true ) : void

Stop animating all properties at once.

StopAnimatingProperty ( AnimatableProperty pty, bool finish = true ) : void

Stop animating a property.

Update ( ) : void

Applies value derivatives to values.

보호된 메소드들

메소드 설명
DynamicObject ( ) : System

비공개 메소드들

메소드 설명
findAnimator ( AnimatableProperty pty ) : IPropertyAnimator

Find an animator for a property;

updateAnimatedProperties ( ) : void

Update all animated properties for the object.

메소드 상세

AnimateProperty() 공개 메소드

Animate a custom float property.
public AnimateProperty ( float>.Action setter, float initial, float value, float time, InterpolationMode interpolationMode = InterpolationMode.Linear, bool animateBack = false ) : void
setter float>.Action The function that sets the object's property.
initial float Initial value.
value float Desired value.
time float Effect duration.
interpolationMode InterpolationMode Interpolation mode.
animateBack bool Flag that animates the property back when the effect has finished.
리턴 void

AnimateProperty() 공개 메소드

Animate a standard vector property.
public AnimateProperty ( AnimatableProperty pty, Vector2 value, float time, InterpolationMode interpolationMode = InterpolationMode.Linear, bool animateBack = false ) : void
pty AnimatableProperty Property to animate. Can be Position and ScaleVector.
value Vector2 Desired value.
time float Effect duration.
interpolationMode InterpolationMode Interpolation mode.
animateBack bool Flag that animates the property back when the effect has finished.
리턴 void

AnimateProperty() 공개 메소드

Animate a standard float property.
public AnimateProperty ( AnimatableProperty pty, float value, float time, InterpolationMode interpolationMode = InterpolationMode.Linear, bool animateBack = false ) : void
pty AnimatableProperty Property type to animate. Can be Angle, Scale and Transparency.
value float Desired value.
time float Effect duration.
interpolationMode InterpolationMode Interpolation mode.
animateBack bool Flag that animates the property back when the effect has finished.
리턴 void

AnimateProperty() 공개 메소드

Animate a standard color property.
public AnimateProperty ( Color value, float time, InterpolationMode interpolationMode = InterpolationMode.Linear, bool animateBack = false ) : void
value Color Desired value.
time float Effect duration.
interpolationMode InterpolationMode Interpolation mode.
animateBack bool Flag that animates the property back when the effect has finished.
리턴 void

Blink() 공개 메소드

Make the object blink.
public Blink ( int times, float duration ) : void
times int Number of times to blink.
duration float Length of the blinking effect duration.
리턴 void

Draw() 공개 메소드

public Draw ( SpriteBatch batch ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch
리턴 void

DynamicObject() 보호된 메소드

protected DynamicObject ( ) : System
리턴 System

IsAnimatingProperty() 공개 메소드

Check if a property is currently being animated.
public IsAnimatingProperty ( AnimatableProperty pty ) : bool
pty AnimatableProperty Property type.
리턴 bool

Move() 공개 메소드

Make the object move in a given direction at a given speed.
public Move ( float speed, float angle ) : void
speed float Speed.
angle float Direction.
리턴 void

MoveAlongCurve() 공개 메소드

Move an object along a bezier curve.
public MoveAlongCurve ( ) : void
리턴 void

MoveAlongCurve() 공개 메소드

Move an object along a bezier curve.
public MoveAlongCurve ( IEnumerable points ) : void
points IEnumerable Point array.
리턴 void

MoveToPoint() 공개 메소드

Move to a specified point in a given amount of time.
public MoveToPoint ( Vector2 point, float time, InterpolationMode mode = InterpolationMode.Linear ) : void
point Vector2 Destination point.
time float Movement duration.
mode InterpolationMode Interpolation mode.
리턴 void

MoveToPoint() 공개 메소드

Move to a specified point in a given amount of time.
public MoveToPoint ( float x, float y, float time, InterpolationMode mode = InterpolationMode.Linear ) : void
x float Destination point's X coordinate.
y float Destination point's Y coordinate.
time float Movement duration.
mode InterpolationMode Interpolation mode.
리턴 void

MoveTowards() 공개 메소드

Move the object towards a point.
public MoveTowards ( Vector2 point ) : void
point Vector2 Desired point.
리턴 void

MoveTowards() 공개 메소드

Move the object towards another object.
public MoveTowards ( VisualObjectBase obj ) : void
obj VisualObjectBase Object to move towards.
리턴 void

PauseAnimatingAllProperties() 공개 메소드

Suspend all property animation until further notice.
public PauseAnimatingAllProperties ( bool pause = true ) : void
pause bool Pause flag.
리턴 void

PauseAnimatingProperty() 공개 메소드

Suspend property animation until further notice.
public PauseAnimatingProperty ( AnimatableProperty pty, bool pause = true ) : void
pty AnimatableProperty
pause bool Pause flag.
리턴 void

Remove() 공개 메소드

Remove the object by applying fadeout effects.
public Remove ( ) : void
리턴 void

Remove() 공개 메소드

Remove the object.
public Remove ( bool instantly ) : void
instantly bool Apply fadeout effects or not?
리턴 void

Stop() 공개 메소드

Stop the object.
public Stop ( ) : void
리턴 void

StopAnimatingAllProperties() 공개 메소드

Stop animating all properties at once.
public StopAnimatingAllProperties ( bool finish = true ) : void
finish bool Set the property to desired value or leave it as it is?
리턴 void

StopAnimatingProperty() 공개 메소드

Stop animating a property.
public StopAnimatingProperty ( AnimatableProperty pty, bool finish = true ) : void
pty AnimatableProperty Property.
finish bool Set the property to desired value or leave as it is?
리턴 void

Update() 공개 메소드

Applies value derivatives to values.
public Update ( ) : void
리턴 void

프로퍼티 상세

Acceleration 공개적으로 프로퍼티

Speed derivative.
public float Acceleration
리턴 float

Angle 공개적으로 프로퍼티

Sprite angle in radians.
public float Angle
리턴 float

AngleShift 공개적으로 프로퍼티

Angle derivative. Sprite is rotated by this value each second.
public float AngleShift
리턴 float

AngularAcceleration 공개적으로 프로퍼티

Direction derivative.
public float AngularAcceleration
리턴 float

BlendState 공개적으로 프로퍼티

Blending mode.
public BlendState,Microsoft.Xna.Framework.Graphics BlendState
리턴 Microsoft.Xna.Framework.Graphics.BlendState

Momentum 공개적으로 프로퍼티

Sprite momentum. Sprite is moved by this value each second.
public Vector2 Momentum
리턴 Vector2

Pause 공개적으로 프로퍼티

public PauseTarget Pause
리턴 PauseTarget

Scale 공개적으로 프로퍼티

Sprite scale. 1 = normal size.
public float Scale
리턴 float

ScaleShift 공개적으로 프로퍼티

Scale derivative: Scale is incremented or decremented by this value each second.
public float ScaleShift
리턴 float

ScaleVector 공개적으로 프로퍼티

Sprite scale that can be different for X and Y axis.
public Vector2? ScaleVector
리턴 Vector2?

TintColor 공개적으로 프로퍼티

Sprite tint color. Default is White (No tint).
public Color TintColor
리턴 Color

TransparencyShift 공개적으로 프로퍼티

Transparency derivative. The transparency is altered by this value each second.
public float TransparencyShift
리턴 float