GuideTips.ts 581 B

1234567891011121314151617181920212223242526272829303132
  1. import BaseEvent from "../base/BaseEvent";
  2. const {ccclass, property} = cc._decorator;
  3. /**
  4. * 提示类引导
  5. * 踩上去后消失
  6. */
  7. @ccclass
  8. export default class GuideTips extends BaseEvent {
  9. @property(cc.Node)
  10. mNode: cc.Node = null;
  11. onLoad(){
  12. super.onLoad()
  13. let stageAttr = this.ff.main.player.stage
  14. if(stageAttr.stageIndex != 0){
  15. this.node.destroy()
  16. }
  17. }
  18. /**
  19. * 主角进入碰撞区域
  20. * @param tag 碰撞组件编号
  21. */
  22. public onBegin(tag:number){
  23. this.node.destroy()
  24. }
  25. }