123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- using System;
- using System.Diagnostics;
- namespace Spine
- {
- public class TrackEntry
- {
- public Animation Animation
- {
- get
- {
- return this.animation;
- }
- }
- public float Delay
- {
- get
- {
- return this.delay;
- }
- set
- {
- this.delay = value;
- }
- }
- public float Time
- {
- get
- {
- return this.time;
- }
- set
- {
- this.time = value;
- }
- }
- public float LastTime
- {
- get
- {
- return this.lastTime;
- }
- set
- {
- this.lastTime = value;
- }
- }
- public float EndTime
- {
- get
- {
- return this.endTime;
- }
- set
- {
- this.endTime = value;
- }
- }
- public float TimeScale
- {
- get
- {
- return this.timeScale;
- }
- set
- {
- this.timeScale = value;
- }
- }
- public float Mix
- {
- get
- {
- return this.mix;
- }
- set
- {
- this.mix = value;
- }
- }
- public bool Loop
- {
- get
- {
- return this.loop;
- }
- set
- {
- this.loop = value;
- }
- }
- //[DebuggerBrowsable(DebuggerBrowsableState.Never)]
- public event AnimationState.StartEndDelegate Start;
- //[DebuggerBrowsable(DebuggerBrowsableState.Never)]
- public event AnimationState.StartEndDelegate End;
- //[DebuggerBrowsable(DebuggerBrowsableState.Never)]
- public event AnimationState.EventDelegate Event;
- //[DebuggerBrowsable(DebuggerBrowsableState.Never)]
- public event AnimationState.CompleteDelegate Complete;
- internal void OnStart(AnimationState state, int index)
- {
- if (this.Start != null)
- {
- this.Start(state, index);
- }
- }
- internal void OnEnd(AnimationState state, int index)
- {
- if (this.End != null)
- {
- this.End(state, index);
- }
- }
- internal void OnEvent(AnimationState state, int index, Event e)
- {
- if (this.Event != null)
- {
- this.Event(state, index, e);
- }
- }
- internal void OnComplete(AnimationState state, int index, int loopCount)
- {
- if (this.Complete != null)
- {
- this.Complete(state, index, loopCount);
- }
- }
- public override string ToString()
- {
- return (this.animation != null) ? this.animation.name : "<none>";
- }
- internal TrackEntry next;
- internal TrackEntry previous;
- internal Animation animation;
- internal bool loop;
- internal float delay;
- internal float time;
- internal float lastTime = -1f;
- internal float endTime;
- internal float timeScale = 1f;
- internal float mixTime;
- internal float mixDuration;
- internal float mix = 1f;
- }
- }
|