i used to be following a tutorial i observe it like a e-book and that i obtained an error which i do not know what might have trigger it
it says:
Didn’t get default worth of “pace” at school “NewClass”. If utilizing TypeScript, you additionally have to cross within the “default” attribute required by the “property” decorator.
the code i used:
const {ccclass, property} = cc._decorator;
@ccclass
export default class NewClass extends cc.Part {
@property
pace: quantity = 10 ;
onLoad () {
}
begin () {
}
replace (dt) {
this.node.setPosition(this.node.place.x+this.pace*dt,this.node.place.y);
if(this.node.place.x>this.node.dad or mum.width)
{
this.node.setPosition(0,this.node.place.y);
}
}
}
not solely that however i’m additionally unable to set the worth in cocos creator because it ought to
it ought to seem a field the place i set the worth for every particular person zombies however the field just isn’t even there.
please clarify me why i obtained this error, what might have brought about it and the right way to repair it.
Thanks!!
I attempted your code in 2.4.9 and it didn’t report you this error. Underneath what circumstances do you report the error?
Hello, if the issue is solved, please reply.