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

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

1641. 2.0按钮添加事件报错 cannot read property 'on' fof undefined [ 66%]

....btn_register.on("click", this, this.ToRegisterPage); } ToRegisterPage() : void { this.loadScene("login/register_page"); } }   //调用on的时候 直接会报Cannot read property 'on' of undefined   我再把生成的ui代码贴出来 export class login_bgUI extends View {         public ...

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

1642. 陀螺仪与加速计 · LayaAir3.4 · 引擎文档 · LAYABOX [ 66%]

...e onDeviceorientation(absolute: Boolean, rotationInfo: Laya.RotationInfo): void { this.info.text = "alpha:" + Math.floor(rotationInfo.alpha) + '\n' + "beta :" + Math.floor(rotationInfo.beta) + '\n' + "gamma:" + Math.floor(rotationInfo.gamma); } } new Gyroscope_Sample(); 2、加速计 ​ Accelerator...

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

1643. [LayaAir2]字节小游戏物理的坐标不一样,碰撞盒会比laya的小,物理的位置也不一样 [ 66%]

...;     cameraOffset:Laya.Point=new Laya.Point(180,570);     onEnable(): void {         Laya.Physics.I.allowSleeping = false;         this.strWorldRoot= this.owner.scene.strWorldRoot;         Laya.Physics.I.worldRoot = this.strWorldRoot;     }     onUpdate(): void {         var...

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

1644. 多光源渲染(ActionScript-3D基础(AS3)-LayaAir3D之灯光) [ 66%]

...径数组 public var moveRanges: Array = []; public function onUpdate(): void { var seed: Number = Laya.timer.currTimer * 0.002; for (var i: int = 0, n: Number = this.lights.length; i 加载场景,并且添加多光源 ```typescript Scene3D.load("res/threeDimen/scene/MultiLightScene/InventoryScene...

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

1645. 文本-禁止编辑 [ 66%]

...ya.stage.bgColor = "#232628"; this.createInput(); } private createInput(): void { var inputText: Input = new Input(); inputText.size(350, 100); inputText.x = Laya.stage.width - inputText.width >> 1; inputText.y = Laya.stage.height - inputText.height >> 1; inputText.text = "这段文本不可编辑...

来源: Laya_示例 发布时间: 20260303

1646. 陀螺仪与加速计(TypeScript-LayaAir基础篇(TS)-硬件设备相关) [ 66%]

... onDeviceorientation(absolute: Boolean, rotationInfo: Laya.RotationInfo): void { this.info.text = "alpha:" + Math.floor(rotationInfo.alpha) + '\n' + "beta :" + Math.floor(rotationInfo.beta) + '\n' + "gamma:" + Math.floor(rotationInfo.gamma); } } new Gyroscope_Sample(); ``` ## 2、加速计 ​ `Ac...

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

1647. 在微信小游戏真机wx.onShow和wx.onHide中的currTimer的问题 [ 66%]

...iniAdpter.window.wx.onHide(_onHideWX); } private function _onShowWX(res:*):void { console.log("wx.onShow:",res); console.log(Laya.timer.currTimer); } private function _onHideWX():void { console.log("wx.onHide:"); console.log(Laya.timer.currTimer); } wx.onShow.currTimer == wx.onHide.currTimer 这两...

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

1648. 截屏无法实现 [ 66%]

... gmajrtfp 赞同来自: static View gv;     @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         getWindow().requestFeature(Window.FEATURE_NO_TITLE);         getWindow().setFlags(WindowManager.LayoutParams.FLAG...

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

1649. textInput的单行输入&多行输入(ActionScript-LayaAir基础篇(AS3)-文本) [ 66%]

...leline () Text_InputMultiline(); } private function Text_InputSingleline():void { var textInput:TextInput = new TextInput("单行输入");//创建一个 TextInput 类的实例对象 textInput 。 textInput.wordWrap = true;//设置 textInput 的文本自动换行。 textInput.fontSize = 30;//设置 t...

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

1650. sk文件加载 [ 66%]

...     }                  private function beginLoad():void {             //加载引擎需要的资源             // Laya.loader.load([{url:"res/sk/cow.sk",type:Loader.BUFFER}], Handler.create(this, onLoaded));             onLoaded();     ...

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