美文网首页
缩放,按钮添加点击事件

缩放,按钮添加点击事件

作者: 沉麟 | 来源:发表于2019-11-21 11:00 被阅读0次
            this.guideVideo.visible = true;
            this.guideVideo.scale(0, 0);//先将教学动画缩放到0
            Laya.Tween.to(this.guideVideo, { scaleX: 1.05, scaleY: 1.05 }, 500, Laya.Ease.quintOut, Laya.Handler.create(this, () => {
                Laya.Tween.to(this.guideVideo, { scaleX: 1, scaleY: 1 }, 100, Laya.Ease.quintInOut);
            }));//教学动画由小变大
            this.guideVideo.play();
            this.closeGuideBtn.once(Laya.Event.CLICK, this, () => {//给关闭按钮(图片)添加点击事件
                this.maskGuide.visible = false;
                this.guideVideo.visible = false;
                GameDataManager.Instance.isGuided = true;
                GameDataManager.Instance.saveData();
                //GameDataManager.Instance.clearData();
                if (this.isReady) {
                    this.playReadGo();
                }
            });

相关文章

网友评论

      本文标题:缩放,按钮添加点击事件

      本文链接:https://www.haomeiwen.com/subject/ubbzictx.html