content_only_tip.ts 632 B

1234567891011121314151617181920212223
  1. import { _decorator, Component, Node } from 'cc';
  2. import { gameManager } from '../gameManager';
  3. const { ccclass, property } = _decorator;
  4. @ccclass('content_only_tip')
  5. export class content_only_tip extends Component {
  6. @property(Node) btn_tip: Node = null;
  7. protected m_callback: Function = null;
  8. protected start(): void {
  9. this.btn_tip.on(Node.EventType.TOUCH_END, ()=> {
  10. gameManager.Singleton.showTips()
  11. if(this.m_callback!=null) {
  12. this.m_callback()
  13. }
  14. },this)
  15. }
  16. initView(callback:Function = null) {
  17. this.m_callback = callback
  18. }
  19. }