大约有 2,789 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0082 秒)
Laya_社区(1162) Laya3.0_api(543) Laya2.0_api(297) laya_api(221) Laya2.0_文档(201) Laya_示例(139) Laya3.0_文档(117) Laya2.0_示例(109)
...olor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } private updateRectPos(): void { this.rect.x = Laya.stage.width / 2; this.rect...
来源: Laya2.0_示例 发布时间: 20260303
...olor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } private updateRectPos(): void { this.rect.x = Laya.stage.width / 2; this.rect...
来源: Laya2.0_示例 发布时间: 20260303
... Public Methods Show Inherited Public Methods MethodDefined By destroy():void 销毁组件 Component onReset():void 重置组件参数到默认值,如果实现了这个函数,则组件会被重置并且自动回收到对象池,方便下次复用 如果没有重置,则不进行回收复用...
来源: Laya2.0_api 发布时间: 20190513
...//组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { this.socket = new Laya.Socket(); // 注册事件监听 this.socket.on(Laya.Event.OPEN, this, this.onSocketOpen); this.socket.on(Laya.Event.MESSAGE, this, this.onMessageReceived); this.socket.on(Laya.Event.CLOSE, this, ...
来源: Laya3.0_文档 发布时间: 20251010
...Number 计算当前点和目标点(x,y)的距离。 Point normalize():void 标准化向量。 Point recover():void 回收到对象池,方便复用 Point reset():Point 重置 Point setTo(x:Number, y:Number):Point 将 Point 的成员设置为指定值。 Point toString():String返...
来源: Laya2.0_api 发布时间: 20190513
...er.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { list=new List(); Laya.stage.addChild(list); list.itemRender=Item; list.repeatX=1; list.repeatY=6; list.x=((Laya.stage.width-Item.WID)/2); list.y=((Laya.stage.height-Item.HEI*list.repeatY)/2); list.vScrollBarSkin="comp/...
来源: Laya_社区 发布时间: 20170626
...ctor() { super(); } loadImageAndPos(name:string,posX:number,posY:number):void { this.name = name; this.anchorX = 0; this.anchorY = 0; this.x = posX; //这里是256*整数倍的叠加 每张图片都是256*256大小的地图块 this.y = posY; //这里是256*整数倍的叠加 每张图片都是256*...
来源: Laya_社区 发布时间: 20190315
...式化后的地址。 Returns string Methods Static __init__ __init__(): void Defined in laya/net/URL.ts:31 Returns void Static customFormat customFormat(url: string): string Defined in laya/net/URL.ts:70 自定义URL格式化的方式。例如: customFormat = function(url:String):String{} Paramet...
来源: Laya3.0_api 发布时间: 20231115
...olidColorTexture2DProtected Methods MethodDefined By detoryResource():void[override] 销毁资源。 SolidColorTexture2D recreateResource():void[override] 重新创建资源,如果异步创建中被强制释放再创建,则需等待释放完成后再重新加载创建。 SolidColorTextur...
来源: laya_api 发布时间: 20170929
... changeViewPort(moveX:Number, moveY:Number, width:Number, height:Number):void 改变视口大小 TiledMap changeViewPortBySize(width:Number, height:Number, rect:Rectangle = null):Rectangle 在锚点的基础上计算,通过宽和高,重新计算视口 TiledMap createMap(mapName:String, vi...
来源: laya_api 发布时间: 20170929