boss_tips.ts 494 B

1234567891011121314151617181920
  1. import { _decorator, Component, Node } from 'cc';
  2. const { ccclass, property } = _decorator;
  3. @ccclass('boss_tips')
  4. export class boss_tips extends Component {
  5. @property(Node) btn_tips:Node = null;
  6. private call_back = null;
  7. protected start(): void {
  8. this.btn_tips.on(Node.EventType.TOUCH_END,()=>{
  9. if(this.call_back!=null){
  10. this.call_back()
  11. }
  12. })
  13. }
  14. public initView(call){
  15. this.call_back = call;
  16. }
  17. }