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

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

841. 鼠标交互-滑动 [ 79%]

...Laya.Sprite, Event = Laya.Event; const w = 50; const h = 30; this.button = new Sprite(); this.button.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) this.button.size(w, h); this.button.x = ...

来源: Laya2.0_示例 发布时间: 20260303

842. destination-out 叠加模式问题 [ 79%]

...endertarget太大了 可以这样限制一下 guideContainer.scrollRect = new Rectangle(0, 0, Browser.clientWidth, Browser.clientHeight); 2017-12-15 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 li970704928 相关问题 发起问题须...

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

843. tiledmap 可以在图块层的指定格子上添加Sprite吗 [ 79%]

...ame:string, x:number, y:number){ super(); //显示登陆界面 this.tMap = new Laya.TiledMap() this.tMap.antiCrack = true //创建Rectangle实例,视口区域 var viewRect:Laya.Rectangle = new Laya.Rectangle(0, 0, Conf.App_Width, Conf.App_Height); //创建TiledMap地图 this.tMap.createMap("map/"+...

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

844. 判断玩家在地面还在空中 [ 79%]

...transform.position.y-bc.sizeY/2 - 0.05         let vec3:Laya.Vector3 = new Laya.Vector3(this.transform.position.x,y,this.transform.position.z);         var ray = new Laya.Ray(vec3,new Laya.Vector3(0,0,1));         (this.owner.scene as Laya.Scene3D).physicsSimulation.rayCast(ray,this.outH...

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

845. AS类中初始化JS类相关问题 [ 79%]

...回调 //__JS__('window.eval(data + "//# sourceURL=" + "Base.min.js")'); //new需要的类   //_base = new Browser.window.Base(); _base = __JS__('new Base');   //执行到这里就报错  “Uncaught ReferenceError: Base is not defined”   }   麻烦帮我看看哪里有问题 2018-05-07 添...

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

846. RenderTexture 无法再image上显示 [ 79%]

....CameraClearFlags.SolidColor;           this.modelCamera.clearColor = new Laya.Vector4(0, 0, 0, 0);           this.modelCamera.renderTarget = new Laya.RenderTexture(512, 512, Laya.RenderTextureFormat.R8G8B8A8, Laya.RenderTextureDepthFormat.DEPTHSTENCIL_24_8);           this.modelCamer...

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

847. Laya tiledmap 监听事件未响应 [ 79%]

...dMap      /** */     private onLost() {          this.tiledMap = new Laya.TiledMap();          this.tiledMap.createMap("resource/tiledMap/isometric_grass_and_water.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.create(this, this.mapLoaded), null, new Point(16...

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

848. 一个场景,两个线形碰撞体,出错 [ 79%]

...         if (!_shape) {                 _shape = new window.box2d.b2ChainShape();                 _setShape(false);             }             this.label = (this.label || "ChainCollider");             return super.getDef(); ...

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

849. 在UI类里调用启动类的静态函数失败了 [ 79%]

...nLoading)); } static aaa(): void { } private onLoaded(): void { var info = new view.GameInfo(); info.zOrder = 99;//置最顶,这句话不写图层看不见 // info.init(); Laya.stage.addChild(info); } private onLoading(): void { var bj = new BeiJing(); Laya.stage.addChild(bj); } } new GameMain();  ...

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

850. 请问UI页面怎么移除 [ 79%]

...么移除 我在login.ui里面一个按钮事件触发Laya.stage.addChild(new game());然后这个是动态事件,怎么样在login.ui函数里面先移除这个game.ui页面后再addChild进来呢。因为多次事件触发后就相当于NEW了很多进来。尝试login.remoeChild(game);和game.r...

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