                 ani.duration = CFTimeInterval(1.0 / ani.repeatCount)
                 ani.fillMode = kCAFillModeBoth
                 layer.addAnimation(ani, forKey: "transform")
-            } else if type == "shift" {
+            case "shift":
                 let shiftLayer = (innerLayer == nil) ? layer : innerLayer!
                 let ani = CAKeyframeAnimation(keyPath: "transform")
                 let shift:CGSize = {

                ani.duration = CFTimeInterval(1.0 / ani.repeatCount)
                ani.fillMode = kCAFillModeBoth
                layer.addAnimation(ani, forKey: "transform")
            } else if type == "path" {
                if let shapeLayer = self.shapeLayer {
                    var values = [shapeLayer.path!]
                    if let params = animation["path"] as? [AnyObject] {

                        shapeLayer.addAnimation(ani, forKey: "path")
                    }
                }
            case "sprite":
                self.dir = (1,0)
                self.repeatCount = CGFloat(repeatCount)
            default:
                break
            }
        }
        
