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

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

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

...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

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

...    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

3. 打飞机点开始游戏加载飞机动画不出来,点重新开始,才出来,新手求助! [ 90%]

...() { function Hero(type, hp) { Hero.__super.call(this); this.fly(); } Laya.class(Hero,"Hero", Air); var _proto = Hero.prototype; _proto.fly = function() { this.playAction("fly") } })(); air类: (function() { function Air(type, hp) { this.hp = hp; this.type = type; this.body = null; Air.__super.cal...

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

4. 版本管理swf找同名的Json文件发现找不到 [ 84%]

...配的是Map192e06db1ff.json MovieClip类是找Map192622077fd.json export class MMovieClip extends Laya.MovieClip{         constructor(){             super();         }         //初始化预加载数据         public m_initData(url:string,atlas:boolean,a...

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

5. fillTexture使用问题 [ 84%]

...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

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

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

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

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

...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. @regClass编译报错! [ 77%]

@regClass编译报错! 去掉CtrBase里的@regClass 就不报错! 再或者CtrBase 不引用funzzzzz 或者 funzzzzz不引用MachineCtrl 也不会报错。已经是最精简的就三个类,每个一行代码。上网查 升级了webpack也没用。   写了构造函数也没用 bundle编译...

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

9. Cannot read property 'toDefault' of undefined报错是什么原因 [ 67%]

...ty 'toDefault' of undefined报错是什么原因 主要代码如下:Laya.class(MousePickingScene, "MousePickingScene", Laya.Scene); function MousePickingScene() { MousePickingScene.super(this); this.camera = new Laya.Camera(0,0.1,100); this.addChild(this.camera); this.camera.clearFlag = Laya.BaseC...

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

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

...会报错说_showGridList不存在,需要在libs/LayaAir.d.ts里,找到class MapLayer extends Sprite这一行,在下面加上 _showGridList: Array<any>;即可 wu语 • 2018-08-07 19:51 1.7.19.1版本不行

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