大约有 23 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0029 秒)
...rIDE让项目开发更高效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Text = Laya.Text; var Gyroscope = Laya.Gyroscope; var RotationInfo = Laya.RotationInfo; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var Event = Laya.Event; var compa...
来源: Laya_示例 发布时间: 20241118
...ompass { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(700, 1024, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.s...
来源: Laya2.0_示例 发布时间: 20241118
...xt(); info.fontSize = 50; info.color = "#FFFFFF"; info.size(Laya.stage.width, Laya.stage.height); Laya.stage.addChild(info); Gyroscope.instance.on(Event.CHANGE, this, onDeviceorientation); } private function onDeviceorientation(absolute:Boolean, rotationInfo:RotationInfo)...
来源: Laya2.0_文档 发布时间: 20210714
... this.info.fontSize = 50; this.info.color = "#FFFFFF"; this.info.size(Laya.stage.width, Laya.stage.height); Laya.stage.addChild(this.info); Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, this.onDeviceorientation); } private onDeviceorientation(absolute: Boolean, rotationInfo: Laya.RotationInfo)...
来源: Laya3.0_文档 发布时间: 20230303
... this.info.fontSize = 50; this.info.color = "#FFFFFF"; this.info.size(Laya.stage.width, Laya.stage.height); Laya.stage.addChild(this.info); Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, this.onDeviceorientation); } private onDeviceorientation(absolute: Boolean, rotationInfo: Laya.RotationInf...
来源: Laya2.0_文档 发布时间: 20210715
... 我用的是mac系统,每次重新启动模拟器的时候,会出现stage的宽高变化了: printScreenInfo("aaa"); Laya.loader.load(resArr, Handler.create(this, this.onResLoaded, [this.mainuiView, winName, zOrder])); printScreenInfo("bbb"); private onResLoaded(parent:Laya.Node, winName:s...
来源: Laya_社区 发布时间: 20180316
... this.info.fontSize = 50; this.info.color = "#FFFFFF"; this.info.size(Laya.stage.width, Laya.stage.height); Laya.stage.addChild(this.info); Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, onDeviceorientation); function onDeviceorientation(absolute, rotationInfo) { this.info.text = "alpha:" +...
来源: Laya2.0_文档 发布时间: 20210714
... this.list = list; Laya.stage.addChild(list); this.hitArea = new Laya.HitArea(); this.hitArea.hit.drawRect(list.x, list.y -100,list.width, list.height, "#000000"); //限制鼠标点击区域 ...
来源: Laya_社区 发布时间: 20210122
...// 程序入口 class GameMain { constructor() { Laya.init(600, 400); Laya.stage.bgColor = "#123456"; Laya.loader.load([ { url: "res/beijing/beijing2.png", type: Laya.Loader.IMAGE }, { url: "res/atlas/comp.png", type: Laya.Loader.IMAGE }, { url: "res/atlas/comp.atlas", type: Laya.Loader.ATLAS }], La...
来源: Laya_社区 发布时间: 20180507
...); this.tiledMap.createMap("desert.json", new Laya.Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Laya.Handler.create(this,this.loadedMap)); } loadedMap(){ this.sp=new Laya.Sprite(); this.sp.graphics.drawRect(0,0,100,100,"#FF0000"); var mapLayer = this.tiledMap.getLayerByInd...
来源: Laya_社区 发布时间: 20171125