Monster1.ts 334 B

12345678910111213141516
  1. import MonsterBase from "./MonsterBase";
  2. const {ccclass, property} = cc._decorator;
  3. @ccclass
  4. export default class Monster1 extends MonsterBase {
  5. protected get initSpeed():number{
  6. return Util.random(200,300);
  7. }
  8. protected init(): void {
  9. super.init();
  10. this.speed = this.initSpeed;
  11. }
  12. }