怎么才能调用到ball这个script里的方法
var ball = this._scene.getChildByName("ball");
console.log(ball);
ballAction = ball.getComponent("Ball");
ballAction.ballMove();
log显示object
但是之后就报错了
Simulator: JS Exception: assignment to undeclared variable ballAction, file: /Users/michael/Desktop/Learn/temp/quick-scripts/assets/HeroControl.js, lineno: 257