import MonsterBase from "./MonsterBase"; const {ccclass, property} = cc._decorator; @ccclass export default class Monster1 extends MonsterBase { protected get initSpeed():number{ return Util.random(200,300); } protected init(): void { super.init(); this.speed = this.initSpeed; } }