faxian_view.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { _decorator, Component, Node } from 'cc';
  2. import { GameMng } from '../GameMng';
  3. import { UIButton } from '../gcommon/UIButton';
  4. import { UIManager } from '../gcommon/UIManager';
  5. const { ccclass, property } = _decorator;
  6. @ccclass('faxian_view')
  7. export class faxian_view extends Component {
  8. @property(Node)
  9. btn_shop: Node = null;
  10. @property(Node)
  11. btn_bag: Node = null;
  12. @property(Node)
  13. btn_email: Node = null;
  14. @property(Node)
  15. btn_activity: Node = null;
  16. @property(Node)
  17. btn_welfare: Node = null;
  18. start() {
  19. UIButton.BindClick(this.btn_shop,()=>{
  20. UIManager.AddPrefab(GameMng.Instance.shop_view)
  21. },this)
  22. UIButton.BindClick(this.btn_bag,()=>{
  23. UIManager.AddPrefab(GameMng.Instance.bag_view)
  24. },this)
  25. UIButton.BindClick(this.btn_email,()=>{
  26. UIManager.AddPrefab(GameMng.Instance.email_view)
  27. },this)
  28. UIButton.BindClick(this.btn_activity,()=>{
  29. UIManager.AddPrefab(GameMng.Instance.activity_view)
  30. },this)
  31. UIButton.BindClick(this.btn_welfare,()=>{
  32. UIManager.AddPrefab(GameMng.Instance.welfare_view)
  33. },this)
  34. }
  35. update(deltaTime: number) {
  36. }
  37. }