大约有 397 项符合查询结果, 库内数据总量为 30,900 项。 (搜索耗时: 0.0043 秒)
...事件派发监听管理类 * 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
...要添加如下的示例代码,实现脚本控制CheckBox: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.CheckBox }) public checkbox: Laya.CheckBox; //组件被激活后执行,此时所有节点和组件均已创建完毕...
来源: Laya3.0_文档 发布时间: 20240910
...之后材质基类由BaseMaterial变更为Material。 ```typescript export class CustomMaterial extends Laya.Material { constructor() { super(); //设置本材质使用的shader名字 this.setShaderName("CustomShader"); } } ``` #### 4.使用自定义材质 在使用自定义材质之前,一定...
来源: Laya2.0_文档 发布时间: 20210715
...弹出一个对话框,对话框里面展示 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
....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
...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
... 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
...?代码如下: /**Created by the LayaAirIDE*/ module view { export class Guide extends ui.GuideUI { constructor() { super(); // 创建Video元素 let videoElmt: any = Laya.Browser.createElement("video"); Laya.Browser.document.body.appendChild(videoElmt); // 设置Video元素地样式和属性...
来源: Laya_社区 发布时间: 20180802
....StageScaleMode; import flash.events.Event; import login.LoginView; public class Main extends Sprite { public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); t...
来源: Laya_社区 发布时间: 20151103
...之后材质基类由BaseMaterial变更为Material。 ```typescript export class CustomMaterial extends Laya.Material { public function CustomMaterial() { super(); //设置本材质使用的shader名字 this.setShaderName("CustomShader"); } } ``` #### 4.使用自定义材质 在使用自定义...
来源: Laya2.0_文档 发布时间: 20210715