Apricot.Motion.Next C# (CSharp) Method

Next() public method

public Next ( ) : bool
return bool
        public bool Next()
        {
            this.framePosition++;

            if (this.framePosition < this.spriteCollection.Count)
            {
                return true;
            }
            else
            {
                if (this.spriteCollection.Count > 0)
                {
                    this.framePosition = this.spriteCollection.Count - 1;
                }
                else
                {
                    this.framePosition = 0;
                }
            }

            return false;
        }