                 ani.duration = CFTimeInterval(1.0 / ani.repeatCount)
                 ani.fillMode = kCAFillModeBoth
                 layer.addAnimation(ani, forKey: "opacity")
-            } else if type == "wiggle" {
+            case "wiggle":
                 let delta = valueFrom(animation, key: "delta", defaultValue: 15) * CGFloat(M_PI / 180.0)
                 let ani = CAKeyframeAnimation(keyPath: "transform")
                 ani.values = [NSValue(CATransform3D:layer.transform),

                        shapeLayer.addAnimation(ani, forKey: "path")
                    }
                }
            } else if type == "sprite" {
                self.dir = (1,0)
                self.repeatCount = CGFloat(repeatCount)
            }
        }
        

                ani.duration = CFTimeInterval(1.0 / ani.repeatCount)
                ani.fillMode = kCAFillModeBoth
                shiftLayer.addAnimation(ani, forKey: "transform")
            case "blink":
                let ani = CAKeyframeAnimation(keyPath: "opacity")
                ani.values = [1.0, 0.0, 1.0]
                ani.repeatCount = repeatCount
