示例#1
0
 /// <summary> Sets various settings, such as looping and actions that can cancel the Animation. </summary>
 public void SetOptions(Animation.LoopSettings enLooping, Animation.CancelOptions enCancel, bool bSpellCancellable, bool bMoveCancellable)
 {
     enLoopSettings       = enLooping;
     enCancelOptions      = enCancel;
     bIsSpellCancellable  = bSpellCancellable;
     bIsAttackCancellable = (bIsMoveCancellable = bMoveCancellable);
 }
示例#2
0
 public Animation(ushort p_iID, byte p_byAnimationDirection, Texture2D p_txTexture, Vector2 p_v2PositionOffset)
 {
     this.iID = p_iID;
     this.txTexture = p_txTexture;
     this.iTicksPerFrame = 100;
     this.iEndFrame = 1;
     this.iCellRenderHeight = (this.iCellHeight = this.txTexture.Height);
     this.iCellRenderWidth = (this.iCellWidth = this.txTexture.Width);
     this.iOffsetX = 0;
     this.iOffsetY = 0;
     this.enLoopSettings = Animation.LoopSettings.Clamp;
     this.iFramesPerRow = 1;
     this.v2PositionOffset = p_v2PositionOffset;
     this.enCancelOptions = Animation.CancelOptions.IgnoreIfPlaying;
     this.bIsMoveCancellable = false;
     this.bIsSpellCancellable = false;
     this.byAnimationDirection = p_byAnimationDirection;
 }
示例#3
0
 public Animation(ushort p_iID, byte p_byAnimationDirection, Texture2D p_txTexture, Vector2 p_v2PositionOffset, int p_iTicksPerFrame, int p_iEndFrame, int p_iCellWidth, int p_iCellHeight, int p_iOffsetX, int p_iOffsetY, int p_iFramesPerRow, Animation.LoopSettings p_enLoopSettings, Animation.CancelOptions p_enDefaultCancelOptions, bool p_bIsMoveCancellable, bool p_bIsSpellCancellable, params AnimationInstruction[] p_axAnimationInstructions)
 {
     this.iID = p_iID;
     this.txTexture = p_txTexture;
     this.iTicksPerFrame = p_iTicksPerFrame;
     this.iEndFrame = p_iEndFrame;
     this.iCellHeight = p_iCellHeight;
     this.iCellRenderHeight = p_iCellHeight;
     this.iCellWidth = p_iCellWidth;
     this.iCellRenderWidth = p_iCellWidth;
     this.iOffsetX = p_iOffsetX;
     this.iOffsetY = p_iOffsetY;
     this.enLoopSettings = p_enLoopSettings;
     this.iFramesPerRow = p_iFramesPerRow;
     this.v2PositionOffset = p_v2PositionOffset;
     this.enCancelOptions = p_enDefaultCancelOptions;
     this.lxAnimationInstructions = p_axAnimationInstructions.ToList<AnimationInstruction>();
     this.bIsMoveCancellable = p_bIsMoveCancellable;
     this.bIsAttackCancellable = p_bIsMoveCancellable;
     this.bIsSpellCancellable = p_bIsSpellCancellable;
     this.byAnimationDirection = p_byAnimationDirection;
 }