unit79.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import { _decorator, Node, tween, UIOpacity } from 'cc';
  2. import { BaseZhaocha } from '../../hall/script/BaseZhaocha';
  3. const { ccclass, property } = _decorator;
  4. @ccclass('unit79')
  5. export class unit79 extends BaseZhaocha {
  6. override answerName: Array<string> = [
  7. "路由器",
  8. "音响",
  9. "字母",
  10. "电线",
  11. "塑料凳",
  12. "啤酒",
  13. "墨水",
  14. "啤酒杯",
  15. "新鲜荔枝",
  16. "臭豆腐",
  17. "手表",
  18. "蝴蝶结",
  19. ]
  20. // override num_showTip: number = 0;
  21. // override str_tishi = "拖动右下角的落叶,露出藏在后面的纸板";
  22. // @property(Node)
  23. // node_cat: Node = null;
  24. // startPos = null
  25. // override start(): void {
  26. // super.start()
  27. // this.node_cat.on(Node.EventType.TOUCH_START, this.touchStart, this)
  28. // this.node_cat.on(Node.EventType.TOUCH_MOVE, this.touchMove, this)
  29. // this.node_cat.on(Node.EventType.TOUCH_END, this.touchEnd, this)
  30. // this.node_cat.on(Node.EventType.TOUCH_CANCEL, this.touchEnd, this)
  31. // }
  32. // touchStart(e) {
  33. // this.startPos = e.getUILocation()
  34. // }
  35. // touchMove() {
  36. // }
  37. // touchEnd(e) {
  38. // let endpos = e.getUILocation()
  39. // if (this.startPos.subtract(endpos).length() > 100) {
  40. // tween(this.node_cat.getComponent(UIOpacity))
  41. // .to(0.5, { opacity: 0 })
  42. // .call(() => {
  43. // this.node_cat.active = false
  44. // this.arr_node_allitem[0].active = true
  45. // })
  46. // .start()
  47. // }
  48. // this.startPos = null
  49. // }
  50. }