大约有 458 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0054 秒)
...r"; const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { @property({ type: Laya.Sprite }) public player: Laya.Sprite; @property({ type: Laya.Sprite }) public joystick: Laya.Sprite; @property({ type: Laya.Sprite }) public...
来源: Laya_社区 发布时间: 20251125
....on(Laya.Event.CLICK, ()=> { console.log("clicked"); }); class MyScript extends Laya.Script { //脚本事件 onMouseClick(e:Event) { console.log("clicked"); } } aNode.addComponent(MyScript); 以上两种方式是等价的,且在纯2D,或2D/3D混合这两种情况中均可正常使用。 3.2 2...
来源: Laya3.0_文档 发布时间: 20251010
...互引用,改为: public instance:any } export default class B extends A{ } 2024-12-16 1 0 分享 微博 QZONE 微信 正阳子 赞同来自: laya这种类顺序问题是类相互循环引用导致,比如A,B相互继承,然后又相互引用,100%导致引擎出现这种问题...
来源: Laya_社区 发布时间: 20241209
...toreTxList); 悬赏找大神看问题 export default class StoreItem extends Laya.Box { constructor() { super(); this.size(195, 210); } } 附件 : --> ListDemo.zip 2019-07-11 添加评论 已悬赏10元 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链...
来源: Laya_社区 发布时间: 20190711
...; import laya.utils.Browser; import laya.utils.HitArea; public class KouTu extends Sprite { private var box:Sprite; private var interactionArea:Sprite; private var maskArea:Sprite; private var guideContainer:Sprite; private var gameContainer:Sprite; public function KouTu() { super(); //绘制一个...
来源: Laya_社区 发布时间: 20170315
...import laya.utils.Byte; public class CConnector extends Socket { protected var sendBuf:Byte = null; protected var recvBuf:Byte = null; public function CConnector() { ...
来源: Laya_社区 发布时间: 20170920
...用 ui3d.sprite 获取 prefab 的根节点. export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { let sprite3d: Laya.Sprite3D = this.scene3D.getChildByName("m_Sprite3D"); let ui3d: Laya.UI3D = sprite3d.getComponent(Laya.UI3D); let ui3d_root: Laya.Sprite = ui3d.sprite; console.l...
来源: Laya_社区 发布时间: 20251020
...d消失 parent.child_1.rotation = Math.random() * 180; } } class ChildView extends ui.ChildViewUI{ constructor(){ super(); var panel = new Laya.Panel(); panel.pos(0,0); panel.size(200,50); this.addChild(panel); var panelChild = new Laya.Sprite(); panelChild.pos(0,0); panelChild.size(200,50); panel.a...
来源: Laya_社区 发布时间: 20170829
...e.components.Box; import morn.core.handlers.Handler; public class ListView extends ListViewUI { public function ListView() { super(); var arr:Array=[]; for(var i:int=0;i<95;i++) { arr.push({icon:i,label:"Index"+i}); } boxList.array=arr; boxList.mouseHandler=new Handler(listRender); } private func...
来源: Laya_社区 发布时间: 20151224
...rotation旋转之后检测不了碰撞 附上代码 class FishPonds extends Laya.Sprite { public are: Laya.Rectangle = new Laya.Rectangle(0, 0, 60, 30); constructor() { super(); var _fish: Laya.Sprite = new Laya.Sprite() _fish.graphics.drawRect(this.are.x, this.are.y, this.are.width, this.are.h...
来源: Laya_社区 发布时间: 20180315