大约有 520 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0043 秒)
...).png", "../../res/ui/close.png"]; Laya.loader.load(assets, Handler.create(this, onSkinLoadComplete)); })(); function onSkinLoadComplete() { var dialog = new Dialog(); var bg = new Image(assets[0]); dialog.addChild(bg); var button = new Button(assets[1]); button.name = Dialog.CLOSE; button.pos(DIALO...
来源: Laya_示例 发布时间: 20251130
... Laya.Script { constructor(){super();} onEnable(){} onClick(){ alert("id="+this.id); //这里有一个id,但是系统自动生成的,无法获知这个id代表哪个按钮被点(因为我有4个按钮都绑了这个js) alert("name="+this.name); //未定义不知道怎么获取当前按钮nam...
来源: Laya_社区 发布时间: 20181029
...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createTexts(); } createTexts() { this.createLabel("只允许输入数字:").pos(50, 20); let input = this.createInput(); input.pos(50, 50); input.restrict = "0-9"; this.createLabel("只允许输入字母:").pos(50, 1...
来源: Laya2.0_示例 发布时间: 20251130
... = true; //选择单元格时回调方法 list.selectHandler = new Handler(this, onSelect); //渲染单元格时的回调方法 list.renderHandler = new Handler(this, updateItem); //为列表赋值 list.array = data; //加载到舞台 Laya.stage.addChild(list); } /***渲染单元格时的回调方...
来源: Laya2.0_文档 发布时间: 20210715
...; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(this, setup)); })(); function setup() { createApe(); showDragRegion(); } function createApe() { ape = new Sprite(); ape.loadImage(ApePath); Laya.stage.addChild(ape); var texture = Laya.loader.getRes(ApePath); ape.pivot(textur...
来源: Laya_示例 发布时间: 20251130
...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createMap(); Laya.stage.on(Laya.Event.CLICK, this, this.onStageClick); } createMap() { const TiledMap = Laya.TiledMap, Rectangle = Laya.Rectangle, Point = Laya.Point; this.tiledMap = new TiledMap(); this.tiledMap.createM...
来源: Laya2.0_示例 发布时间: 20251130
...牌大了。可是我的牌还是出不去 computer() { Laya.timer.clear(this,this.computer); var NTS: number; var NTE: number; this.nextTurn; let i = this.turnNumber; if(i==0){ return; } this.getPlayer(); } gotoNext(){ this.turnNumber++; if(this.turnNumber>3) { this.turnNumber=0 } } public...
来源: Laya_社区 发布时间: 20180626
...).png", "res/ui/checkbox (6).png"]; Laya.loader.load(skins, Handler.create(this, this.onCheckBoxSkinLoaded)); } onCheckBoxSkinLoaded() { let cb; for (let i = 0; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stag...
来源: Laya2.0_示例 发布时间: 20251130
... 墙体设有弹力: WestWall0.restitution = 0.8;//弹力 球设有: this.cubeRigids[i].linearDamping = 0.3;//线性阻力 this.cubeRigids[i].angularDamping = 0.3;//角阻力 this.cubeRigids[i].restitution = 0.8;//弹力 this.cubeRigids[i].friction = 0.6;//摩擦力 给白球施加相同方向...
来源: Laya_社区 发布时间: 20200701
....pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.timer.frameLoop(1, this, animate); } function animate(e) { apesCtn.rotation += 1; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = Laya.Browser; import WebGL = Laya.WebGL; ...
来源: Laya_示例 发布时间: 20251130