mirror of
https://gitee.com/dgflash/oops-plugin-framework.git
synced 2026-05-13 00:47:33 +08:00
删除console.assert方法的引用,规避微信小游戏平台不兼容报错
This commit is contained in:
@@ -52,7 +52,10 @@ export class MoveTo extends Component {
|
||||
update(dt: number) {
|
||||
let end: Vec3;
|
||||
|
||||
console.assert(this.speed > 0, "移动速度必须要大于零");
|
||||
if (this.speed <= 0) {
|
||||
console.error("移动速度必须要大于零");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.target instanceof Node) {
|
||||
end = this.ns == Node.NodeSpace.WORLD ? this.target.worldPosition : this.target.position;
|
||||
|
||||
Reference in New Issue
Block a user