真的对中文互联网感到失望,这么简单的东西,搜遍全网都找不到,只会抄袭搬运。
const {ccclass, property} = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
charIndex: number;
goodCode: any[];
badCode: any[];
label: any;
ball: any;
radius: number;
angle: number;
radian: number;
angleToRadian: number;
speed: number;
time: number;
interval: number;
start () {
this.ball = this.node.getChildByName("ball")
this.angleToRadian = Math.PI / 180