大约有 488 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0043 秒)
...ya; @regClass() export class UI_Tree extends Laya.Script { constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { var res: any[] = ["atlas/comp/vscroll.png", "atlas/comp/vscroll$bar.png", "atlas/comp/vscroll...
来源: Laya3.0_文档 发布时间: 20240910
...mage = Laya.Image; var WID = 373, HEI = 85; function Item() { Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img); this.setImg = function(src) { this.img.skin = src; } } Laya.class(Item, "Item", Box); // 主要逻辑代码 var Stage = Laya.St...
来源: Laya_社区 发布时间: 20180731
...edresize"; private static var _i:MsgMgr = null; public function MsgMgr() { super(); } public static function get instance():MsgMgr { return _i ||= new MsgMgr(); } /**初始化消息监听**/ public function init():void { //接收主域透传的数据 if(MiniAdpter.isZiYu && MiniAdpter.isPosM...
来源: Laya_社区 发布时间: 20180525
...tmap extends Laya.Image { private szurl:string="" constructor(url:string){ super() this.onUrlChangeHandler(url); } protected onUrlChangeHandler(url:string):void { if(this.szurl!="") this.disp() this.szurl=url; if(url==null){ this.graphics.clear(); }else{ this.skin=url; } } public disp(){ thi...
来源: Laya_社区 发布时间: 20181201
...script export class CustomMaterial extends Laya.Material { constructor() { super(); //设置本材质使用的shader名字 this.setShaderName("CustomShader"); } } ``` #### 4.使用自定义材质 在使用自定义材质之前,一定要记得初始化自己的Shader。LayaAir中自带的材质...
来源: Laya2.0_文档 发布时间: 20210715
...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'); //dialog.addChild(bg); var button = new Laya.Button('...
来源: Laya_社区 发布时间: 20190117
...e = new Sprite(); private var arr:Array = []; public function TestView() { super(); _path.pivot(0,0); _path.pos(a.x,a.y); this.addChild(_path); _path.rotation = Math.atan2(b.y - a.y, b.x - a.x) / Math.PI * 180; var len:int = Math.floor(GetPathLen()/PATH_LEN)+2; var p:Image; for(var i:int = 0;i<le...
来源: Laya_社区 发布时间: 20171113
...nds EffectAnimation { //然后又改成Laya.EffectAnimation constructor(){ super(); this.ani1=null; this.effectData =ui.kick_effectUI.uiView;; } } kick_effectUI.uiView={"type":"View","props":{},"compId":2,"child":[{"type":"Sprite","props":{"y":0,"x":0,"texture":"ani/p1.png"},"compId":3}],"animations...
来源: Laya_社区 发布时间: 20210111
... public static HEI:number =30; constructor(){ super() this.size(Item.WID,Item.HEI); var img1 =new Laya.Image("bg0.png"); var img2 =new Laya.Image("bg1.png"); this.pos(0,0); img1.size(100,30);...
来源: Laya_社区 发布时间: 20190522
...DE*/ 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元素地样式和属性 videoElmt.style.zInddex = Laya.Render.canvas.st...
来源: Laya_社区 发布时间: 20180802