import { _decorator, Node, tween, UIOpacity } from 'cc'; import { BaseZhaocha } from '../../hall/script/BaseZhaocha'; const { ccclass, property } = _decorator; @ccclass('unit85') export class unit85 extends BaseZhaocha { override answerName: Array = [ "现代灶台", "水龙头", "尖叫鸡", "抽油烟机", "摄像头", "冰箱", "电饭煲", "温度计", "调料", "卫生纸", "闹钟", "水果刀", ] override num_showTip: number = 2; override str_tishi = "点击抽油烟机的开关吸走烟雾,露出藏在后面的尖叫鸡。"; @property(Node) node_zhanai3: Node = null; @property(Node) node_zhanai2: Node = null; @property(Node) node_zhanai: Node = null; startPos = null override start(): void { super.start() this.node_zhanai.on(Node.EventType.TOUCH_START, this.touchStart, this) this.node_zhanai.on(Node.EventType.TOUCH_MOVE, this.touchMove, this) this.node_zhanai.on(Node.EventType.TOUCH_END, this.touchEnd, this) this.node_zhanai.on(Node.EventType.TOUCH_CANCEL, this.touchEnd, this) } touchStart(e) { this.node_zhanai3.active = true tween(this.node_zhanai2.getComponent(UIOpacity)) .to(0.3, { opacity: 0 }) .call(() => { this.node_zhanai2.active = false this.arr_node_allitem[2].active = true }) .start() } touchMove() { } touchEnd(e) { } }