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

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

161. 代码创建精灵监听不到事件? [ 70%]

...]);   var _proto = StorageUILayer.prototype;   _proto.onclick = function(params){ console.log("--------------------------------hhhhhhhhhhh- "); }   ---------------------------------------------------------- 麻烦看下,这个为何监听不到点击的事件呢?会是什么原因可能导致...

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

162. 文本进阶使用 · LayaAir3.3 · 引擎文档 · LAYABOX [ 70%]

...t的代码使用方法说明如下: /** * 在画布上绘制文本。 * @param text 在画布上输出的文本。 * @param x 开始绘制文本的 x 坐标位置(相对于画布)。 * @param y 开始绘制文本的 y 坐标位置(相对于画布)。 * @param font 定义字号和字体,...

来源: Laya3.0_文档 发布时间: 20251010

163. 材质。相机显示异常问题 [ 69%]

...部缩放。 * @return 局部缩放。 */ /** * 设置局部缩放。 * @param value 局部缩放。 */ localScale: Vector3; /** * 获取世界缩放。 * @return 世界缩放。 */ /** * 设置世界缩放。 * @param value 世界缩放。 */ scale: Vector3; w1114367261 • 2018-04-17 18:06 localSc...

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

164. Text的中划线(删除线) [ 69%]

...库,可以使用下面这个:/** * 给text加中划线(删除线) * @param element 元素 * @param options * { * lineColor 颜色 可选 默认文字颜色 * lineWidth 线条粗度 可选 默认 2 * } 线颜色 (默认文字颜色) */ exports.drawDeleteTextLine = function (element, options =...

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

165. 3d对象使用addChild后localPosition没有变化 [ 69%]

...***287 赞同来自: 只能暂时这么解决/** * 辅助3D添加对象 * @param owner * @param child */ static addChildHelper(owner: Laya.Node, child: Laya.Sprite3D) { let position = child.transform.position.clone() let rotation = child.transform.rotation.clone() let scale = child.transform.getWorl...

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

166. [LayaAirIDE3]xcode切入切出声音不播放 [ 69%]

...Manager.instance;     }      /**      * 设置BGM音量      * @param value 0-100      */     public setBGMVolume(value: number): void {         const bgmVolume = Math.min(100, Math.max(0, value)) / 100;         Laya.SoundManager.setMusicVolume(bgmVolume);         /* if (...

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

167. [LayaAirIDE 2.0]TextInput真机输入时显示蓝色字,求解 [ 69%]

...输入有误!"); return false; } return true; } /** * 输入框事件 * @param input TextInput * @param lable Label * @param e Event */ private _onInputEvent(input: Laya.TextInput, lable: Laya.Label, e: string) { switch (e) { case Laya.Event.FOCUS: // input.color = "#fff"; // // 输入框内没有...

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

168. Laya 绑定显示内容到骨骼动画 [ 69%]

...Source[]; constructor(){ super(); this.__bindList=[]; }  /** * 绑定 * @param source */ bind(source:BindSource):void{ let index:number=this.__bindList.indexOf(source); if(index<0){ this.__bindList.push(source); } this.addChild(source); this.timer.frameLoop(1,this,this.__updateBinds); }  unb...

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

169. 简单的震屏效果 [ 69%]

...变量:x水平方向  5,y垂直方向  5,rotation旋转角度  10 * @param view * @param time  持续时间 以毫秒为单位 */ function vibrateScreen(view: Laya.Sprite, time?: number): void {     if (vibrateObj.view) {         Laya.timer.clearAll(vibrateObj);    ...

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

170. 2D网格渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 68%]

...// mesh2Drender.lightReceive = true; } /** * 生成一个圆形2D网格 * @param radius 圆的半径 * @param numSegments 圆被分割的段数,段数越多圆越平滑 */ private generateCircleVerticesAndUV(radius: number, numSegments: number): Laya.Mesh2D { // 2π const twoPi = Math.PI * 2; // ...

来源: Laya3.0_文档 发布时间: 20251120