• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 3 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0012 秒)

1. 设置遮罩(JavaScript-LayaAir基础篇(JS)-位图) [ 100%]

...e(this,graphicsImg)); })(); function graphicsImg() { img = new Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(Res),150,50); //添加到舞台 Laya.stage.addChild(img); } })(); ``` 运行效果如图2所示: ![图2](img/2.jpg)(图2) ### 2.2 创建...

来源: Laya2.0_文档 发布时间: 20210715

2. 设置遮罩(TypeScript-LayaAir基础篇(TS)-位图) [ 99%]

...aphicsImg)); } private graphicsImg():void{ this.img = new Laya.Sprite(); //获取图片资源,绘制到画布 this.img.graphics.drawTexture(Laya.loader.getRes(this.Res),150,50); //添加到舞台 Laya.stage.addChild(this.img); } } new MaskDemo(); ``` 运行效果如图2所示: ![图2](img/2.jpg)...

来源: Laya2.0_文档 发布时间: 20210715

3. runTime使用(TypeScript-IDE篇(TS)-组件化开发相关) [ 95%]

...this.tipLbll,this.scoreLbl,具有代码提示效果。而script脚本获取只能通过this.owner.getChildByName("xxx") 等方式获取节点** - **建议:如果是页面级的逻辑,需要频繁访问页面内多个元素,使用runtime继承式写法,如果是独立小模块,功能单...

来源: Laya2.0_文档 发布时间: 20210715