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

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

1121. LayaAir DebugPanel 调试工具(ActionScript-2D进阶篇(AS3)-调试相关) [ 46%]

...a.debug.DebugPanel; import laya.display.Sprite; public class Main { public function Main() { //初始化舞台 Laya.init(1334,750); //调用DebugPanel调试面板 Laya.enableDebugPanel(); //设置舞台背景色 Laya.stage.bgColor = "#ffffff"; var Img:Sprite = new Sprite(); //添加到舞台 Laya.st...

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

1122. laya.ui.Label_API3.0 [ 46%]

...例。 package { import laya.ui.Label; public class Label_Example { public function Label_Example() { Laya.init(640, 800);//设置游戏画布宽高、渲染模式。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 onInit(); } private function onInit():void { var label:Label = new La...

来源: Laya3.0_api 发布时间: 20231115

1123. 屏幕方向:自动横屏与自动竖屏的设置详解(TypeScript-LayaAir基础篇(TS)-屏幕适配) [ 46%]

...名称正确。 #### screenModeDemo.ts 示例代码如下: ```javascript function showScreen(): void { //图片 var img:Laya.Image = new Laya.Image(); img.centerX = 0; img.centerY = -70; img.skin = "res/monkey2.png"; Laya.stage.addChild(img); //文字 var text:Laya.Label = new Laya.Label(); text.t...

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

1124. layaAir TS项目如何引用protoBuf库? [ 46%]

...wesome.proto", onAssetsLoaded);         //回调函数         function onAssetsLoaded(err, root){             if (err)                 throw err;             // Obtain a message type             var AwesomeMessage = root.lookup("awesomepackage.Awes...

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

1125. 微信小游戏中不能加载proto文件 [ 46%]

...  request:fail invalid url "res/protobuf/Login.proto"   具体代码: (function () { var Loader = Laya.Loader; var Browser = Laya.Browser; var Handler = Laya.Handler; console.log("!____________________________________")  var ProtoBuf = Browser.window.protobuf;  // Laya.init(550, 400);  ProtoB...

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

1126. laya.d3.core.ui3d.UI3D_API3.0 [ 46%]

...ss with type parameter Constructor Method Accessor Object literal Variable Function Type alias Inherited property Inherited method Inherited accessor Enumeration Interface Static property

来源: Laya3.0_api 发布时间: 20231115

1127. TiledMap加载报错 relativePath为空 [ 45%]

...ence1.json",new Rectangle(0,0,800, 800),Handler.create(this,onMapLoaded)); function onMapLoaded(){ console.log("地图加载完成"); }scence1.json { "height":25, "infinite":false, "layers":[ { "data":[7, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 1, 1, 7, 7, 7, 1, 1, 1, 1, 1,...

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

1128. LayaAir2.0(LayaBox)之小游戏开放域开发 [ 45%]

...ar mark = 0; if(Laya.Browser.onMiniGame){ Laya.Browser.window.wx.onMessage(function(data){//微信接受信息 if(data.url == "res/atlas/test.atlas" || data.url == "test/1.png" ||data.url == "test/2.png"||data.url == "test/3.png"){ mark ++; console.log("------data.url:" + JSON.stringify(data.url)); ...

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

1129. 用npm的protobuf导出的ts代码。然后用import { } from "" 运行到这里没反应,不继续执行,也不报错。 [ 45%]

...一个模块 MyModuleimport { com} from "../libs/protobuf/area.js"; export function testProto():void { console.log("call testProto"); var ProtobufUtil = com.bee.protobuf; let msg = ProtobufUtil.ProtoArea.create(); let buffer = ProtobufUtil.ProtoArea.encode(msg).finish(); let decode = ProtobufUtil.Pr...

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

1130. laya.display.Text_API3.0 [ 45%]

...ple package { import laya.display.Text; public class Text_Example { public function Text_Example() { Laya.init(640, 800);//设置游戏画布宽高、渲染模式。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 onInit(); } private function onInit():void { var text:Text = new Text(...

来源: Laya3.0_api 发布时间: 20231115