大约有 6,598 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0142 秒)
Laya_社区(5247) Laya3.0_api(482) Laya2.0_文档(363) Laya_示例(154) Laya2.0_示例(116) Laya3.0_文档(105) Laya2.0_api(67) laya_api(64)
...可以绑定任意的自定义数据。 目前我已经用 let view:View = new View(); view["userData"] = myObject; 实现了 2018-06-14 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 bearocean 相关问题 看了其他引擎才发现 LA...
来源: Laya_社区 发布时间: 20180528
...res/img/m1.jpg",Laya.Handler.create(this,load)); function load(){ let ctn2=new Laya.Sprite(); Laya.stage.addChild(ctn2); var gq=new Laya.Sprite(); gq.loadImage("res/img/m1.jpg",100,100,100,100); ctn2.addChild(gq); gq.on(Laya.Event.CLICK,this,Is); } function Is(){ console.log(1); } 2018-08-06...
来源: Laya_社区 发布时间: 20180806
...人 Coder张琦 • 2018-09-03 18:24 使用DialogManager打开 let store = new Store(); var dialogM = new Laya.DialogManager(); store.isModal = true; dialogM.open(store, true, true); store.onClosed = () => { dialogM.removeSelf(); } 不知道是不是最佳的,但是解决了 Coder张琦 • 201...
来源: Laya_社区 发布时间: 20180712
... function createHScroller() { //实例化垂直滚动条 this.hScrollBar = new HScrollBar(); //加载皮肤资源(其他资源根据规范命名后,会自动加载) this.hScrollBar.skin = "res/ui/hscroll.png"; //设置宽度 this.hScrollBar.width = 400; //设置位置 this.hScrollBar.pos(150, ...
来源: Laya2.0_文档 发布时间: 20210714
...件,放到index.html中。代码如下: ```typescript var myWorker = new Worker("my_task.js"); myWorker.onmessage = function (oEvent) { console.log("Called back by the worker!\n"); }; myWorker.postMessage("start"); // start the worker. ``` 新建一个my_task.js文件,代码如下: ```typesc...
来源: Laya2.0_文档 发布时间: 20210715
...ample() { super(); //初始化引擎 Laya.init(1136, 640); var re:Revent = new Revent(); var de:DisEvent = new DisEvent(); } } } Revent类: package { import laya.display.Sprite; public class Revent extends Sprite { public function Revent() { super(); on(LayaSample.event, this, onhandler); trace("...
来源: Laya_社区 发布时间: 20170604
...横竖屏 Laya.stage.screenMode = "vertical"; Laya.Stat.show(); var icon = new Laya.Sprite(); icon.loadImage('img/test.png'); Laya.stage.addChild(icon); document.body.addEventListener("click",function(){ var kk = icon.drawToCanvas(431, 428).getContext('2d').canvas; var img = new Image(); img.src = k...
来源: Laya_社区 发布时间: 20161107
..._Aaron 赞同来自: SoundManager.playSound("../../res/sounds/btn.mp3", 1, new Handler(this, onComplete)); SoundManager.playMusic("../../res/sounds/bgm.mp3", 1, new Handler(this, onComplete)); https://layaair.ldc.layabox.co ... eDemo 2018-06-14 0 1 分享 微博 QZONE 微信 Laya_Aaron 赞同...
来源: Laya_社区 发布时间: 20180614
...回复 cuixueying 赞同来自: 用TimeLine的方式即可 var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); Laya.stage.addChild(sp); var timeLine:TimeLine=new TimeLine(); timeLine.to(sp,{x:50,y:50},1000).to(sp,{x:30,y:30},1000); timeLine.play(); 2017-06-15 0 2 分享 微博 Q...
来源: Laya_社区 发布时间: 20170615
...LIGN_MIDDLE; Laya.stage.screenMode = Laya.stage.SCREEN_NODE;*/ this.tMap = new Laya.TiledMap(); var viewRect = new Laya.Rectangle(0,0,W,H); this.tMap.createMap("../bin/res/TileMap/orthogonal.json",viewRect); } Start(); 附件 : --> 2018-09-15 添加评论 免费帖 --> 分享 微博 QZONE 微信 ...
来源: Laya_社区 发布时间: 20180915