shop_zhuang_ban_manager.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import { _decorator, Component, Node } from 'cc';
  2. import { zhuang_ban_type } from '../constant';
  3. const { ccclass, property } = _decorator;
  4. @ccclass('shop_zhuang_ban_manager')
  5. export class shop_zhuang_ban_manager extends Component {
  6. @property(Node) qipan_view:Node = null
  7. @property(Node) qizi_view:Node = null
  8. @property(Node) touxiangkuang_view:Node = null
  9. @property(Node) jishiqi_view:Node = null
  10. @property(Node) qipao_view:Node = null
  11. start() {
  12. }
  13. show(type:zhuang_ban_type){
  14. this.qipan_view.active = false;
  15. this.qizi_view.active = false;
  16. this.touxiangkuang_view.active = false;
  17. this.jishiqi_view.active = false;
  18. this.qipao_view.active = false;
  19. switch(type){
  20. case zhuang_ban_type.qi_pan:
  21. this.qipan_view.active = true;
  22. break;
  23. case zhuang_ban_type.qi_zi:
  24. this.qizi_view.active = true;
  25. break;
  26. case zhuang_ban_type.tou_xiang_kuang:
  27. this.touxiangkuang_view.active = true;
  28. break;
  29. case zhuang_ban_type.ji_shi_qi:
  30. this.jishiqi_view.active = true;
  31. break;
  32. case zhuang_ban_type.qi_pao:
  33. this.qipao_view.active = true;
  34. break;
  35. }
  36. }
  37. update(deltaTime: number) {
  38. }
  39. }