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

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

701. Button属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 66%]

... private onLoaded():void{ //创建一个Button实例 var btn:Laya.Button = new Laya.Button(this.skin); //将Button添加到舞台上 Laya.stage.addChild(btn); //设置Button相关属性 btn.width = 100; btn.height = 50; btn.pos(100,100); btn.label = "按钮"; } } new GameMain(); ``` 上述代码运...

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

702. 颜色滤镜 差值变化 [ 66%]

...ll; private _persent: number = 0; protected constructor() { this.targets = new Array<Laya.Sprite>(); } /** * 实例 */ public static getInstance(): ColorTool { if (ColorTool.instance == null) { ColorTool.instance = new ColorTool(); } return ColorTool.instance; }  /** * 添加颜色改变对...

来源: Laya_社区 发布时间: 20180930

703. 点击list中的图片切换,点击第一下没反应,第二下有反应了 [ 66%]

... 要回复问题请先登录 发起人 吴晨敏 相关问题 两个对象new了一个相同的对象,调用第一个的一个方法,走进了第二方法里 请问LayaAir中如何使图片以圆形的方式显示? Dialog:屏蔽点击Dialog之外的区域关闭弹框 liblayaair.so 总是崩...

来源: Laya_社区 发布时间: 20180513

704. 模仿教程里的打地鼠写的代码,运行报错 [ 66%]

...,null,Laya.Loader.ATLAS) })(); function onLoaded(){ //实例化 var tempBG=new background(); Laya.stage.addChild(tempBG); } })();在background.js里是这样写的 var background = (function (_super) { function background() { background.super(this); } Laya.class(background,"background",_super); retu...

来源: Laya_社区 发布时间: 20180129

705. 请问文档里参考代码里的 美术资源在哪下载? [ 66%]

...LayaAir下如何获取图集下的小图资源? 模型资源释放问题 new Laya.Sprite();绘制图形以后,怎么删除释放资源? 请问 《学习开发HTML5游戏《打地鼠》(LayaAir引擎)TS》的视频教程是否有配到代码下载? 关於文档丶API丶Demo若有异动 ...

来源: Laya_社区 发布时间: 20170620

706. 请大家帮助优化一下这个抛物线的代码 [ 66%]

...); } public init():void{ if(!Ball.cached){ Ball.cached = true; this.body = new Laya.Sprite(); this.body.loadImage("war/ball.png"); this.body.pivot(12,12); } this.addChild(this.body); Laya.timer.frameLoop(1,this,this.animate); } private animate(e):void{ this.body.rotation += 10; } } class Main{ priv...

来源: Laya_社区 发布时间: 20171108

707. LayaNative二次开发问题? [ 66%]

...a){ Test.call("wxRegLogin",a); if(data.test == "test"){ var integralMall = new IntegralMall(); Laya.stage.addChild(integralMall); } }); android 里面的方法 public static void wxRegLogin(boolean bOpen){ Log.e("LayaAir回调结果", "================================================================...

来源: Laya_社区 发布时间: 20180103

708. 微信小游戏分包实战(TypeScript-小游戏适配文档-微信小游戏) [ 66%]

...uctor(){ //监听按钮btnA的点击事件,触发后处理 this.GameMain.newUI.btnA.on(Laya.Event.CLICK, this, this.showB); } //显示B页 private showB():void { this.GameMain.showUI(this.ui.bUI,this.GameMain.newUI) //监听按钮btnB的点击事件,触发后处理 this.GameMain.newUI.btnB.on(La...

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

709. 关于当前焦点的问题 [ 66%]

...以判断你当前点击到的是哪个输入框了 例如: textInput = new TextInput(); textInput.bgColor = "#ffcccc"; textInput.size(200,200); Laya.stage.addChild(textInput); textInput.name = "aa"; textInput.on(Event.FOCUS,this,onFoucs); private function onFoucs(e:Event):void { trace(e); } 2017-...

来源: Laya_社区 发布时间: 20171026

710. getimagedata 和putimagedata问题 [ 66%]

...1. getimagedata 无法直接获取, 需要通过 drawToCanvas 然后再 new 一个texture 然后 texture.getPixels() 这 每次都要重新这样获取像素? 2. 在webgl 的情况下,上面的那个方法无效 3. 获取到了像素,但是putimagedata 又不生效 由于官方提供的 te...

来源: Laya_社区 发布时间: 20171201