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

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

311. 分享一个自己做的游戏公告功能,跑马灯效果 [ 51%]

...Sprite = Laya.Sprite import Box = Laya.Box /** 公告栏 */ export default class Notice extends View { /** 滚动区域 */ hornBox: Box /** html对象 */ html: HTMLDivElement /** 滚动框的宽度 */ defaultX = 1110 /** 动画是否出于播放状态 */ isPlayIng:boolean = false /** 空格 */ priva...

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

312. 2.0里面的组件(Laya.Script)的prop其中几个类型应该怎么设置 [ 51%]

...里提供一下其他的类型的范例供大家参考   export default class TestScript extends Laya.Script { /** @prop {name:intType, tips:"整数类型示例", type:Int, default:1000}*/ public intType: number = 1000; /** @prop {name:numType, tips:"数字类型示例", type:Number, default:1000}*...

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

313. 在微信小游戏中使用list,兼听不到mouseHandler跟selectHandler。 [ 50%]

...(this.img);   this.setImg = function(src) { this.img.skin = src; } } Laya.class(Item, "Item", Box);   // 主要逻辑代码 var Stage   = Laya.Stage; var List    = Laya.List; var Handler = Laya.Handler; var WebGL   = Laya.WebGL;     (function() { // 不支持WebGL时自动切换至Canvas L...

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

314. 微信关系链:LayaAir引擎针对开发数据域使用图集支持介绍 [ 50%]

...事件派发监听管理类 * author xiaosong * @date 2017-02-26 */ public class MsgMgr { /**共享画布类型**/ public static var SHAREDRESIZE:String = "sharedresize"; private static var _i:MsgMgr = null; public function MsgMgr() { super(); } public static function get instance():MsgMgr { return ...

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

315. 如何自定义Shader(TypeScript-3D基础(TS)-LayaAir3D之Shader) [ 50%]

...之后材质基类由BaseMaterial变更为Material。 ```typescript export class CustomMaterial extends Laya.Material { constructor() { super(); //设置本材质使用的shader名字 this.setShaderName("CustomShader"); } } ``` #### 4.使用自定义材质 ​ 在使用自定义材质之前,一定...

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

316. LayaBox HelloWorld实战 [ 50%]

...弹出一个对话框,对话框里面展示 Hello World!export default class HelloWorld extends Laya.Scene { constructor() { super(); HelloWorld.instance = this; } onBtnShowClick(){ var dialog = new Laya.Dialog(); dialog.width=300; dialog.height=600; //var bg = new Laya.Image('comp/img_bg.png'); /...

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

317. List属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 50%]

....layabox.com/api2/Chinese/index.html?version=2.9.0beta&type=2D&category=UI&class=laya.ui.List)。 ### 1.1 创建 List 组件 #### 1.编辑列表项。 ​ 列表项可以是 Box 对象或 View(页面) 或其它自定义页面对象。此处以Box 对象为例。 ​ **a.**从资源面板里选...

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

318. ScrollRect设置会引起其他的UI资源无法正在显示 [ 50%]

...ort laya.ui.Image; import laya.utils.Handler; import ui.TestViewUI; public class TestView extends TestViewUI { private var PATH_LEN:Number = 120.0; private var speed:Number = 15; private var _path:Sprite = new Sprite(); private var arr:Array = []; public function TestView() { super(); _path.pivot(0,...

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

319. 字体切片组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 50%]

...下面给出一个示例代码,实现脚本控制FontClip: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property( { type : Laya.FontClip } ) public fontclp: Laya.FontClip; constructor() { super(); } // 组件被激活后执行,此时所有节...

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

320. List 组件做的手风琴Demo [ 50%]

...   this.listArr[0].refresh()         }     /** * 创建BOX */ class Item extends Laya.Box{     public static WID:number =100;     public static HEI:number =30;     constructor(){         super()         this.size(Item.WID,Item.HEI);         var img1 =n...

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