Example #1
0
        public int GetPhysicsShape(int shapeIdx, List <Vector2> physicsShape)
        {
            int physicsShapeCount = this.GetPhysicsShapeCount();

            if (shapeIdx < 0 || shapeIdx >= physicsShapeCount)
            {
                throw new IndexOutOfRangeException(string.Format("Index({0}) is out of bounds(0 - {1})", shapeIdx, physicsShapeCount - 1));
            }
            Sprite.GetPhysicsShapeImpl(this, shapeIdx, physicsShape);
            return(physicsShape.Count);
        }