dungeonNode.ts 680 B

12345678910111213141516171819202122232425262728
  1. import { DUNGEON_TYPE } from "../gameLogic/utrl/gameEnum";
  2. const { ccclass, property } = cc._decorator;
  3. const dungeonName = ['com','com','com','com','com','com', 'gun','gun','gun', 'dining','dining','dining', 'market','market', 'police','police','police', 'hos','hos','hos', 'school']
  4. @ccclass
  5. export default class dungeonNode extends cc.Component {
  6. @property({ type: cc.Enum(DUNGEON_TYPE), displayName: '房间类型' })
  7. dungeonType = DUNGEON_TYPE.comHouse1;
  8. start() {
  9. this.node.$in_sp.scale = 2
  10. }
  11. getName() {
  12. return dungeonName[this.dungeonType];
  13. }
  14. getType() {
  15. return this.dungeonType;
  16. }
  17. // update (dt) {}
  18. }