/**
 * Created by rockyl on 2018/11/5.
 *
 * 摇摆组件
 */

import {ScillaComponent} from "scilla";

export default class Swing extends ScillaComponent {
	duration: number = 10000;

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

		this.transform.rotation = Math.sin(t / 100) * 5;
	}
}
