// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
import {
    showFireworks,
} from '../script/utils';
const { ccclass, property } = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    @property(cc.Label)
    label: cc.Label = null;

    @property
    text: string = 'hello';

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {}

    start() {
        showFireworks(
            cc.find('Canvas/Main Camera'),
            cc.find('RibbonNodeBase').children,
            cc.v2(0, -400), cc.v2(0, 1000), 200, 200
        );
        showFireworks(
            cc.find('Canvas/Main Camera'),
            cc.find('RibbonNodeBase').children,
            cc.v2(-600, -400), cc.v2(200, 1000), 200, 200
        );
        showFireworks(
            cc.find('Canvas/Main Camera'),
            cc.find('RibbonNodeBase').children,
            cc.v2(600, -400), cc.v2(-200, 1000), 200, 200
        );
    }

    // update (dt) {}
}
