大约有 501 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0061 秒)
... this.scene = null; } Laya.class(ObjectRotate, "ObjectRotate", Laya.Script); //这是什么意思有什么作用 ObjectRotate.prototype._initialize = function (owner) { var _this = this; ObjectRotate.__super.prototype._initialize.call(this,owner); //在this(调...
来源: Laya_社区 发布时间: 20170810
...对matter.js的用法给出详细操作步骤 步骤一: 1、新建ActionScript项目,将官方matter.js Demo三选其一copy到项目中,并设置好文档类。 2、将物理引擎代码matter.js和matter-RenderLaya.js拷贝到h5目录下,以及该示例所需的相关图片资源(引擎...
来源: Laya_社区 发布时间: 20160514
...动进入触发器的生命周期。 2.4.4 使用生命周期方法 创建Script3D脚本 生命周期的方法,只能在脚本类里使用,所以,我们需要创建一个脚本,3D游戏必须要继承3D的脚本Script3D。空脚本的示例代码如下: /** * TypeScript语言的3D脚本示...
来源: Laya3.0_文档 发布时间: 20251010
...例如下: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕...
来源: Laya3.0_文档 发布时间: 20251010
...如下: //2.0版本区别为这里需要先import bitmapimg from "./script/bitmapimg "; private flag:boolean = false; private bt:bitmapimg; private oldurl:string="" /**此处省略btn创建*/ private onClick():void { if(this.flag==false){ let url:...
来源: Laya_社区 发布时间: 20181201
TypeScript在LayaAir 1.X和2.X中对待module和namespace的异同,求2.x使用自定义namespace的方法(module已经找到方法) 我发现1.x版本把每个ts编译成为一个js。并且namespace和module暴露在全局空间里,不用import就可以namespace.XXX和module.xxx引用。 ...
来源: Laya_社区 发布时间: 20181026
...libs 文件夹后, 微信开发者工具直接报错: VM125:1 gameThirdScriptError module "libs/laya.wxmini.js" is not defined Error: module "libs/laya.wxmini.js" is not defined at require (http://127.0.0.1:43425/game/__ ... :13569) at http://127.0.0.1:43425/game/__ ... 13424...
来源: Laya_社区 发布时间: 20180602
... { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { let item1 = Laya.Pool.createByClass(TestClass); console.log('item1:', item1.type); Laya.Pool.recoverByClass(item1); let item2 = Laya.Pool.createByClass(TestClass2); console.log('item2:', item2.type); cons...
来源: Laya_社区 发布时间: 20250819
...例代码: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕...
来源: Laya3.0_文档 发布时间: 20251010
...。 二、使用引擎的请求方法 XMLHttpRequest(XHR)是一个 JavaScript 对象,它提供了一种在浏览器中以异步方式发送 HTTP(或 HTTPS)请求并处理服务器响应的机制。例如,获取远程资源、提交表单数据、发送JSON数据等。 在LayaAir引擎中...
来源: Laya3.0_文档 发布时间: 20251010