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

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

1. Timer Handler被覆盖 [ 100%]

Timer Handler被覆盖   class Timer   _getHandler(caller, method) { var cid = caller ? caller.$_GID || (caller.$_GID = ILaya.Utils.getGID()) : 0; var mid = method.$_TID || (method.$_TID = (Timer._mid++) * 100000); return this._map[cid + mid]; }   当游戏玩的功能多时间长了,随着cal...

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

2. Cannot read property 'load' of null [ 98%]

...Laya.loader是null,为什么会出现为null的情况?  代码如下: class main{ constructor(){ MapManager.getInstance().LoadMapResource(); } } new main(); class MapManager { private static s_instance = null; public static getInstance():MapManager { if(null==this.s_instance) { this.s_instance=...

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

3. 重复背景,全方向地图拖动Demo [ 91%]

...o UI创建4个image  var分别: map0,map1,map2,map3 背景图宽高 1800 class WorldPage extends ui.WorldPageUI{ constructor (x,y) { super() this.maxX = 149850 this.maxY = 97500 this.offsetX = x * 150 this.offsetY = y * 150 this.downMouseX = 0 this.downMouseY = 0 Laya.loader.load(['bg/world_bg.jpg...

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

4. tiledMap问题,getTileProperties获取地图属性不能获取到 [ 91%]

...    import { ui } from '../ui/layaMaxUI'; /**主界面 */ export default class Main extends ui.mainUI { /**地图链接 */ MAP_URL:string = 'res/tiled/map.json';  /**地图 */ map: Laya.TiledMap; constructor(){ super(); Laya.loader.create(this.MAP_URL, new Laya.Handler(this, this.onComplete)) } ...

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

5. LayaAir能做RPG吗?不要问我能不能,因为我已经在做 - 杀意来袭 [ 91%]

...G_ENDIAN;设置为高位即可。 4.借用下any ts里面类的你会发现classB明明继承了classA或者实现了接口IA,但是你在使用classB做处理使会出现报错,这个时候借用下any吧,如: classA implements IA{ } classB extends classA{ } var items:IA = ; function(item:c...

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

6. 如何在游戏入口处获取对象的子对象 [ 91%]

...ap = (function (_super) { function loadMap() { loadMap.super(this); } Laya.class(loadMap,"loadMap",_super); var _proto = loadMap.prototype; _proto.init = function() { this.num = ""; this.map = new TiledMap(); } _proto.showMap = function(num) { this.num = num; this.map.createMap("map/level/mota_map" ...

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

7. 引擎 TiledMap 居然不支持图块翻转 [ 89%]

...73741824;     const TiledMapFlipConstHalf = TiledMapFlipConst / 2;     class GridSprite extends Laya.Sprite {         constructor() {             super(...arguments);             this.relativeX = 0;             this.relativeY = 0;             this.isAloneObject = fals...

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

8. 有没有懂tiledmap地图的朋友帮忙看看问什么地图加载不出来 [ 88%]

...t laya.net.Loader; import laya.utils.Handler; import view.TestView; public class LayaUISample { public function LayaUISample() { //初始化引擎 Laya.init(1500, 900); //加载引擎需要的资源 var map1:TiledMap = new TiledMap(); map1.createMap("aa.json",new Rectangle(0,0,1200,720),Handler.crea...

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

9. 泄漏问题,望排查 [ 85%]

...供给您暂时的解决方案: 在项目的laya.core.js内,修改下class Timer的以下几处。     2021-09-22 1 3 分享 微博 QZONE 微信 Laya_Fred 赞同来自: 感谢反馈,我们查看下demo,有消息会回复您。 2021-09-15 0 0 分享 微博 QZONE 微信 刘大明 赞同来...

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

10. fillTexture使用问题 [ 82%]

...exture是可以正常使用的,但是用fillTexture时无任何效果。 class Map extends laya.display.Sprite { static width: number = 1188; static height: number = 594; constructor() { super(); Laya.loader.load("res/images/map_01.png", Laya.Handler.create(this, this.bgLoaded)); } bgLoaded(): voi...

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