1234567891011121314151617181920212223242526272829 |
- import { _decorator, Component, Enum, Node } from 'cc';
- import { CupHeight } from '../TakeGobletGlobalInstance';
- import { LevelAction } from '../LevelAction';
- import { EventDispatcher } from 'db://assets/core_tgx/easy_ui_framework/EventDispatcher';
- import { GameEvent } from '../Enum/GameEvent';
- const { ccclass, property, executeInEditMode } = _decorator;
- /** 原浆酒杯组件脚本*/
- @ccclass('OriginCup')
- @executeInEditMode
- export class OriginCup extends Component {
- @property({ type: Enum(CupHeight), displayName: '杯高度' })
- cupHeight: CupHeight = CupHeight.Two
- @property(Node)
- waters: Node = null!; //水节点
- start() {
- this.node.on(Node.EventType.TOUCH_END, () => {
- EventDispatcher.instance.emit(GameEvent.EVENT_CLICK_ORIGIN_CUP, this);
- });
- }
- update(deltaTime: number) {
- }
- }
|