大约有 21 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0221 秒)
...动进入触发器的生命周期。 2.4.4 使用生命周期方法 创建Script3D脚本 生命周期的方法,只能在脚本类里使用,所以,我们需要创建一个脚本,3D游戏必须要继承3D的脚本Script3D。空脚本的示例代码如下: /** * TypeScript语言的3D脚本示...
来源: Laya3.0_文档 发布时间: 20251010
...](img/3-2.png) (图3-2) 通过代码设置触发器的方式: ```typescript /* ……省略若干代码 */ //创建盒型MeshSprite3D let box = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(sX, sY, sZ))) as Laya.MeshSprite3D; //创建静态碰撞器 let staticCollider:Laya....
来源: Laya2.0_文档 发布时间: 20210715
....0一不小心删了bin目录下的某个场景json文件。。竟然无法自动生成了? Layabox 2.0 bate5 运行编译之后 bundle.js 文件里面没有使用命名空间类文件的定义!导致运行时 找不到类的定义!这是为什么? 已上传 Demo 附件 加载到舞台的3D...
来源: Laya_社区 发布时间: 20190531
...rty } = Laya; @regClass() export default class CameraControll extends Laya.Script { @property( { type: Laya.Sprite3D } ) public target: Laya.Sprite3D; private camera: Laya.Camera; public distanceUp: number = 0.5;//相机与目标的竖直高度参数 public distanceAway: number = 10;//相机与目...
来源: Laya3.0_文档 发布时间: 20251010
...码如下: ... import Vector3 = Laya.Vector3; ... export class AnimationScript extends Laya.AnimatorStateScript { ... private model: Laya.Sprite3D; /**@internal */ setPlayScriptInfo(animator: Laya.Animator | Laya.Animator2D, layerindex: number, playstate: Laya.AnimatorState | Laya.AnimatorState2D)...
来源: Laya3.0_文档 发布时间: 20251010
...代码: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Sprite }) public sprite1: Laya.Sprite; @property({ type: Laya.Sprite }) public sprite2: Laya.Sprite; constructor() { super(); } /** * 组件...
来源: Laya3.0_文档 发布时间: 20251010
...用A*作为寻路的方案,首先需要到 https://github.com/bgrins/javascript-astar 官网下载 astar.js 然后把 astar.js 放到项目的bin目录中,并在 index.html 里引入,如下所示 <script type="text/javascript" src="astar.js"></script> 2.2 A*代码中使用 添加...
来源: Laya3.0_文档 发布时间: 20230303
...上一杯红茶,写下了laya的故事。 工具及涉及:layaide+typescript+pomelo+tiledmap+其他工具 项目类型:mmorpg 人员:zom(客户端) + arrow(服务端) 进度:单机体验状态,实现 摇杆,切图,释放技能(由于人员和精力有限还需要处理公...
来源: Laya_社区 发布时间: 20161109
...rticle3D } from "./Particle3D"; @regClass() export class Main extends Laya.Script { //粒子特效的路径 private filePath = "FireEffect"; onStart() { console.log("Game start"); //加载粒子特效资源 Laya.loader.load(this.filePath, Handler.create(this, () => { })); } //每次鼠标点下...
来源: Laya3.0_文档 发布时间: 20251010
...rticle3D } from "./Particle3D"; @regClass() export class Main extends Laya.Script { //粒子特效的路径 private filePath = "FireEffect"; onStart() { console.log("Game start"); //加载粒子特效资源 Laya.loader.load(this.filePath, Handler.create(this, () => { })); } //每次鼠标点下...
来源: Laya3.0_文档 发布时间: 20250104