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

大约有 520 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0043 秒)

241. UI-Dialog [ 71%]

...).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

242. 请问 layaair2.0的js有没有api可以查询 例如Laya.Script [ 71%]

... Laya.Script { constructor(){super();} onEnable(){} onClick(){ alert("id="+this.id); //这里有一个id,但是系统自动生成的,无法获知这个id代表哪个按钮被点(因为我有4个按钮都绑了这个js) alert("name="+this.name); //未定义不知道怎么获取当前按钮nam...

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

243. 文本-字符限制 [ 71%]

...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

244. List属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 71%]

... = true; //选择单元格时回调方法 list.selectHandler = new Handler(this, onSelect); //渲染单元格时的回调方法 list.renderHandler = new Handler(this, updateItem); //为列表赋值 list.array = data; //加载到舞台 Laya.stage.addChild(list); } /***渲染单元格时的回调方...

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

245. 鼠标交互-拖动 [ 71%]

...; 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

246. 区块地图-等角地图 [ 71%]

...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

247. 关于这个timer我的跑的快在 自己出完牌之后没有人比我的牌大了。可是我的牌还是出不去 [ 71%]

...牌大了。可是我的牌还是出不去 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

248. UI-CheckBox [ 71%]

...).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

249. 3d引擎 相同参数,碰撞结果不一致,同时水平施加冲量,会在上下方向运动 [ 71%]

... 墙体设有弹力: 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

250. Sprite-容器 [ 71%]

....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