import React,{ Component } from 'react';
import {
	Animated
} from 'react-native'

class Animation{
	constructor(props) {
		this.animation = new Animated.Value(0);
	}
}

export class Spring extends Animation{
	constructor() {
	  this.type = " spring"
	}

	animate(callback){
		//  props to add.
		// duration extent
		Animated.spring(this.aimation,{
			toValue:1
		})

		this.animation.addListener(function(n){
			callback && callback(n.value)
		})
	}
}

export class Linear extends Animation{
	constructor() {
	  this.type = "linear"
	}

	animate(callback){
		callback && callback(progress);
	}
}

export class Bounce extends Animation{
	constructor() {
	  this.type = "bounce"
	}

	animate(callback){
		callback && callback(progress);
	}
}

// multi animation method.
export class Stagger extends Animation{
	constructor(animation,gapTime) {
	  this.type = "stagger"

	  this.gapTime = gapTime;
	  this.childAnimation = animation;
	}

	animate(callback){
		Animated.stagger(gapTime,[
			
		]);

		callback && callback(progress);
	}
}
@@ -235,17 +235,16 @@
 type = %22
- 
 spring%22%0A
@@ -244,31 +244,28 @@
 pring%22%0A%09%7D%0A%0A%09
-animate
+play
 (callback)%7B%0A
@@ -440,24 +440,85 @@
 %0A%09%09%7D)%0A%09%7D%0A%7D%0A%0A
+/**%0A * simple contructor%0A * play()%7B%7D%0A * addListener()%7B%7D%0A */%0A%0A
 export class
@@ -586,31 +586,28 @@
 inear%22%0A%09%7D%0A%0A%09
-animate
+play
 (callback)%7B%0A
@@ -638,24 +638,45 @@
 rogress);%0A%09%7D
+%0A%0A%09addListener()%7B%0A%0A%09%7D
 %0A%7D%0A%0Aexport c
@@ -748,31 +748,28 @@
 ounce%22%0A%09%7D%0A%0A%09
-animate
+play
 (callback)%7B%0A
@@ -800,24 +800,45 @@
 rogress);%0A%09%7D
+%0A%0A%09addListener()%7B%0A%0A%09%7D
 %0A%7D%0A%0A// multi
@@ -856,16 +856,17 @@
 method.%0A
+%0A
 export c
@@ -1024,105 +1024,137 @@
 on;%0A
-%09%7D%0A%0A%09animate(callback)%7B%0A%09%09Animated.stagger(gapTime,%5B%0A%09%09%09%0A%09%09%5D);%0A%0A%09%09callback && callback(progress);
+%0A%09  this.listeners = %5B%5D;%0A%09%7D%0A%0A%09play()%7B%0A%09%09Animated.stagger(gapTime,%5B%5D);%0A%09%7D%0A%0A%09addListener(callback)%7B%0A%09%09this.listeners.push(callback)
 %0A%09%7D%0A

Update timing.