/**
 * Created by rockyl on 2019-04-18.
 *
 * 抖动
 */

import ScillaComponent from "components/base/ScillaComponent";
import {createTween} from "scilla";

export default class Animation extends ScillaComponent {
	onCreate() {
		super.onCreate();
	}

	onAwake() {
		super.onAwake();

		createTween(this, this.transform, true, {fields: ['x', 'y']})
			.to({
				position: {x: 100, y: 100},
				scale: {x: 2, y: 3},
				rotation: 270
			}, 1000)
	}

	onUpdate(t) {
		super.onUpdate(t);
	}

	onSleep() {
		super.onSleep();
	}

	onDestroy() {
		super.onDestroy();
	}
}
