大约有 698 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0070 秒)
Laya_社区(336) Laya3.0_api(89) Laya2.0_api(69) Laya2.0_文档(65) laya_api(61) Laya3.0_文档(44) Laya2.0_示例(19) Laya_示例(15)
...edMap.createMap("res/tiledMap/t2.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.create(this, this.mapLoaded), null, new Point(1600, 800)); } private onStageClick(): void { var p: Point = new Point(0, 0); ...
来源: Laya_社区 发布时间: 20201230
...uth/sp_right.png"); this._arrCheck[3] = true; } break; } sp_icon.pos(input.width + 10, -8); input.addChild(sp_icon); } /** * 占位符处理 * @param input TextInput */ private _setPlaceHolder(input: Laya.TextInput) { switch (input.name) { case "input_nickname": // input.changeText("限6个中文以...
来源: Laya_社区 发布时间: 20200410
...种是绝对定位,一种是相对定位 绝对定位时,可以使用width,height,x,y 相对定位时,在某些情况下不是很好用 比如说,我有一个按钮,宽高是固定的,100*100,这时我相对于上级的坐标希望是相对位置,right=0,top=0,表示右上...
来源: Laya_社区 发布时间: 20170217
...运算符,相当于/2 用>>效率更高) var offsetX:number = Laya.stage.width - w >> 1; //显示的字符串 var demoString:string = "LayaBox"; var letterText:Laya.Text; //根据"LayaBox"字符串长度创建单个字符,并对每个单独字符使用缓动动画 for(var i:number = 0,len:number...
来源: Laya2.0_文档 发布时间: 20210715
...(); txt.font = "SimHei"; txt.leading = 3; txt.fontSize = 20; txt.width = 656; txt.wordWrap = true; //给文本的text属性赋值 txt.text = "1级:提高1000%攻击速度,召唤雷电攻击目标,每条雷电必定触发切割。对目标造成0.48%最大生命值伤害,并额...
来源: Laya_社区 发布时间: 20220708
...一个矩形网格的写法, /** * 生成一个矩形2D网格 * @param width 矩形的宽度 * @param height 矩形的高度 */ private generateRectVerticesAndUV(width: number, height: number): Laya.Mesh2D { const vertices = new Float32Array(4 * 5); const indices = new Uint16Array(2 * 3); let inde...
来源: Laya3.0_文档 发布时间: 20251120
tiledmap对象层的东西无法显示 一张girdwidth=5760, girdheight =3840的地图,viewRect设置为viewRect = new Laya.Rectangle(0, 0, Laya.stage.width, Laya.stage.height)时,对象层的东西无法显示出来,但是设置为 new Laya.Rectangle(0, 0, girdwidth, girdheight)却又能显...
来源: Laya_社区 发布时间: 20180319
...ntSize属性的值设为36,align选择为center,调整Lebel的宽高,width为 150,height为60(读者也可以自行修改面板数值或在画布中用鼠标拉伸调整)在<其他>标签中设置bgColor值为#e7c5c5,borderColor设置为#000000(标签边框设为黑色),ita...
来源: Laya_社区 发布时间: 20171222
...的速度和移动比背景快一点 this.x -= 5 * 1.2; if((this.x + this.width) < 0){ //判断整个floor是否不在屏幕里面了 如果不在了 移除当前floor Laya.timer.clear(this, this.onLoop); this.visible = false; this.removeSelf(); } } })(); 地板有了 我们打开MapFloor.js 来...
来源: Laya_社区 发布时间: 20160728
....then((res)=>{ //创建Texture2D var t2d: Texture2D = new Texture2D(res.width, res.height, TextureFormat.R8G8B8A8, false, false, true); t2d.setImageData(res, true, false); //创建Texture var texture: Texture = new Texture(t2d); let sp2:Sprite = new Sprite(); //使用Sprite对象的绘制纹理...
来源: Laya3.0_文档 发布时间: 20230303