Ejemplo n.º 1
0
        internal MovieSequence( MovieSequence sequence )
        {
            this.frames = sequence.frames;
            this.isLoop = sequence.isLoop;
            this.Name = sequence.Name;
            this.FrameCount = this.frames.Count;
            this.Rate = sequence.Rate;

            Reset ( this );
        }
Ejemplo n.º 2
0
        internal Anime( string name, string resourceName, Vector2 location, int width, int height, int rate, string defaultSequenceName, MovieSequence[] sequences, params AnimeAction[] actions )
            : base(name, resourceName, location, width, height, rate,
			0f,
			defaultSequenceName, sequences)
        {
            if ( null != actions )
                foreach ( AnimeAction action in actions )
                    if ( null != action )
                    {
                        action.Anime = this;
                        this.actions.Add ( action );
                    }
        }
Ejemplo n.º 3
0
        internal static bool Next( MovieSequence sequence )
        {
            bool isEnded = sequence.currentFrameIndex == sequence.frames.Count;

            if ( isEnded )
            {
                sequence.IsLooped = true;

                if ( !sequence.isLoop )
                    return isEnded;

                sequence.currentFrameIndex = 1;
            }
            else
                sequence.currentFrameIndex++;

            sequence.CurrentFrame = sequence.frames[sequence.currentFrameIndex - 1];
            return isEnded;
        }
Ejemplo n.º 4
0
        internal static void Reset( MovieSequence sequence )
        {
            sequence.IsLooped = false;
            sequence.currentFrameIndex = 1;

            sequence.CurrentFrame = sequence.frames[sequence.currentFrameIndex - 1];
        }
Ejemplo n.º 5
0
 internal static MovieSequence Clone(MovieSequence sequence )
 {
     return new MovieSequence ( sequence );
 }