const {ccclass, property} = cc._decorator; import {gameMY} from './gameModule'; // const eventTarget = new cc.EventTarget(); enum columnState { } @ccclass export class columnControl extends cc.Component { // @property({type: gameMY}) 這句不行 // public gameModule: gameMY | null = null; @property((cc.Node)) gameModule: cc.Node; private nowAction = null; private columnItem: Array = []; private itemList:Array; private gameModuleScript; actionSet = { "stayPosition": cc.moveTo(0, new cc.Vec2(0, 240)), "rollingUp2Button": cc.sequence(cc.moveTo(0, new cc.Vec2(0, 240)), cc.moveBy(1.5, new cc.Vec2(0, -240))), }; protected onLoad () { this.gameModuleScript = this.gameModule.getComponent('gameMY'); } protected start () { cc.log("this columnControl start"); this.itemList = Object.values(this.gameModuleScript.itemNameMapping); for(let i=0;i