bag_zhuang_ban_manager.ts 987 B

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