Commit a4390be3 authored by unknown's avatar unknown

点击后形成格子好了

parent 27c491aa
......@@ -1040,7 +1040,10 @@
"__uuid__": "69f70b78-4aed-4f84-b360-9e0dc59da4f7",
"__expectedType__": "cc.Prefab"
},
"gridPre": null,
"gridPre": {
"__uuid__": "d02f07b8-737a-4b88-b0b5-702256fe7f06",
"__expectedType__": "cc.Prefab"
},
"countdownLab": null,
"totalTime": 0,
"_id": "17m3iEoEhL27CwezZv9cwb"
......
......@@ -155,8 +155,7 @@ export class AdjacentArrayCtr extends Component {
this.itemPosArrNode.addChild(clickNode);
clickNode.layer = 1 << 25;
clickNode.on(Node.EventType.TOUCH_END, this.onGridClick, this);
let gridSpr = new Node().addComponent(Sprite);
gridSpr.color = new Color(255, 0, 0, 255);
let gridSpr = instantiate(this.gridPre).getComponent(Sprite)!;
gridSpr.node.getComponent(UITransform)!.width = this.itemWidth * 2 + this.itemSpaceX;
gridSpr.node.getComponent(UITransform)!.height = this.itemHeight;
gridSpr.node.layer = 1 << 25;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment