Problem with block input event
Cocos
APRIL 30, 2024
I tried 3 methods, all fo them working normally. start() { let isShow = true; let uit = this.panel.getComponent(UITransform); this.hidAndShowBtn.on(Input.EventType.TOUCH_END, ()=>{ if(!isShow){ // uit.contentSize = size(400, 400); // tween(uit).to(0.5, {contentSize: size(400, 400)}).start(); tween(this.panel).to(0.5, {scale: v3(1,1,1)}).start(); isShow = true; }else{ // uit.contentSize = size(400, 0); // tween(uit).to(0.5, {contentSize: size(400, 0)}).start(); tween(this.panel).to(0.5, {scal
40 40
Let's personalize your content