import { DUNGEON_TYPE } from "../gameLogic/utrl/gameEnum"; const { ccclass, property } = cc._decorator; const dungeonName = ['com','com','com','com','com','com', 'gun','gun','gun', 'dining','dining','dining', 'market','market', 'police','police','police', 'hos','hos','hos', 'school'] @ccclass export default class dungeonNode extends cc.Component { @property({ type: cc.Enum(DUNGEON_TYPE), displayName: '房间类型' }) dungeonType = DUNGEON_TYPE.comHouse1; start() { this.node.$in_sp.scale = 2 } getName() { return dungeonName[this.dungeonType]; } getType() { return this.dungeonType; } // update (dt) {} }