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

大约有 443 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0042 秒)

391. 碰撞检测 outHitInfo.distance 一直等于 -1 ?(TS代码) [ 42%]

...直等于-1?  -------------------------------- class RoleControlScript extends Laya.Script{ /*角色模型*/ public roleModel:Laya.Sprite3D; /*角色动画组件*/ public roleAni:Laya.Animator; /*角色当前动作*/ public currentAction:string = "stand"; /*角色动画是否完成*/ public aniCo...

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

392. List属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 42%]

...+ index); } } import Box = Laya.Box; import Image = Laya.Image; class Item extends Box { public static WID: number = 373; public static HEI: number = 85; private img: Image; constructor(){ super(); this.size(Item.WID, Item.HEI); this.img = new Image(); this.addChild(this.img); } public setImg(src: s...

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

393. 分享水波一个shader [ 42%]

... import BaseTexture = Laya.BaseTexture; export default class Test1Material extends BaseMaterial { public readonly MAIN_TEX:number = Shader3D.propertyNameToID("u_MainTex"); public readonly NOISE_TEX:number = Shader3D.propertyNameToID("u_NoiseTex"); public readonly Time:number = Shader3D.propertyNameT...

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

394. 物理引擎,我按照官方例子做的,不知道那里写错了,总是报这个错,大神帮我看下 [ 41%]

...rt laya.renders.Render; import laya.utils.Browser; public class Retitution extends Sprite { private const stageWidth:int = 800; private const stageHeight:int = 600; private var Matter:Object = Browser.window.Matter; private var LayaRender:Object = Browser.window.LayaRender; private var mouseConstrai...

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

395. 引用第三方JS模块 · LayaAir3.0文档 · LAYABOX [ 41%]

...astar"; const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { private aStarInstance: AStarFinder; onStart() { console.log("Game start"); // 0表示通路,1表示障碍 let myMatrix = [ [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 1, 0, 1, 1, 0], ...

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

396. 继承自Laya.BaseMaterial并且自定义Shader的的自定义材质如何设置透明渲染 [ 41%]

...搜索无果,想请教如何做才能实现。 export default class CMat extends Laya.BaseMaterial { public static _mainTex : number; public static _mainCol : number; inited : boolean = false; constructor() { super(); if(!this.inited) { CMat._mainTex = Laya.Shader3D.propertyNameToID("u_MainTex"); ...

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

397. 【LIST无法拖动】参照官方实例做的 [ 41%]

...ox; import Image = Laya.Image; import Text = Laya.Text; class Item extends Box {     public static WID: number = 400;     public static HEI: number =40;     private text_guanqia: Text;     private text_guanqia_info: Text;      private img: Image;    ...

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

398. Laya中的宏编译要怎么用啊 [ 41%]

...flash.display.StageScaleMode; import flash.events.Event; public class Main extends Sprite { public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); this.stage.s...

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

399. 分享个用美术资源做位图文本的方法。。。 [ 40%]

...eMain(); 运行效果基本上还行, /* * 位图字体; */ class BPFont extends Laya.Sprite{ // 文本内容 private _text: string; // json数据 private _jsonData: any; // 图片数据 private _imageData: Laya.Texture; // 文本字间距 private _padding: number = 0; // 所有元素; private c...

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

400. [BUG]刚体约束问题,移动后约束混乱! [ 40%]

...方式实现,比如子弹脚本。  */ export default class GameUI extends ui.test.TestSceneUI {   private newScene:Laya.Scene3D;   private boxA: Laya.MeshSprite3D;   constructor() {     super();     Laya3D.init(0, 0);     Laya.stage.scaleMode = Laya.Stage.SCALE_FUL...

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