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

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

611. 在Test中有个按钮点击,那么我如何发信号,使得这个点击能给控制Sample中的对象,如何调用函数 [ 66%]

....events.EventDispatcher; public class Mod extends EventDispatcher { public function Mod() { super(); } private static var _instance:Mod; public static function get index():Mod { return _instance ||= new Mod(); } public function init():void { Mod.event("aaaa"); } } }监听:Mod.on("aaa",this,onFunci...

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

612. 改变位置后,点击区域不生效了 [ 66%]

...a.events.Event; import laya.renders.Render; public class MoveTest { public function MoveTest() { Laya.init(600,600); var sp:Sprite = new Sprite(); sp.autoSize=true; sp.graphics.drawRect(0,0,100,100,"#ff0000"); sp.on(Event.CLICK,this,onClick); Laya.stage.addChild(sp); } private function onClick(event...

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

613. 陀螺仪与加速计(JavaScript-LayaAir基础篇(JS)-硬件设备相关) [ 66%]

...Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, onDeviceorientation); function onDeviceorientation(absolute, rotationInfo) { this.info.text = "alpha:" + Math.floor(rotationInfo.alpha) + '\n' + "beta :" + Math.floor(rotationInfo.beta) + '\n' + "gamma:" + Math.floor(rotationInfo.gamma); } ``` ## ...

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

614. ComboBox属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 66%]

...设置ComboBox,创建出符合自己需要的下拉框。 ```javascript (function() { var Stage = Laya.Stage; var ComboBox = Laya.ComboBox; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var skin = "res/ui/combobox.png"; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 6...

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

615. 如何与服务端建立连接 [ 66%]

...on(Event.ERROR,this,errorHandler); 回到方法 成功失败。。 private function openHandler(event:Object = null):void{//正确建立连接; }private function receiveHandler(msg:Object = null):void{///接收到数据触发函数}private function closeHandler(e:Object= null):void{//关闭事件...

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

616. 天空-天空盒 [ 66%]

...s.Stat; import common.CameraMoveScript; public class SkyBoxSample { public function SkyBoxSample() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Stage.SCALE_FULL; Laya.stage.screenMode = Stage.SCREEN_NONE; Stat.show(); var scene:Scene = Laya.stage.addChild(new Scene()) as Scene; var camera:Camer...

来源: Laya_示例 发布时间: 20261113

617. 示例 骨骼动画换装 加不上点击事件 [ 66%]

...指针要变成可点击的指针“小手的样子”,求大神解析 function parseComplete() { mArmature = mFactory.buildArmature(1); mArmature.x = mStartX; mArmature.y = mStartY; //mArmature.scale(0.5, 0.5); Laya.stage.addChild(mArmature); //mArmature.on(Event.LABEL, this, onEvent); mArmature....

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

618. layaair2-cmd 运行报错,求助 [ 66%]

...ming\npm\node_modules\layaair2-cmd\node_modules\gulp\bin\gulp.js'     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)     at Function.Module._load (internal/modules/cjs/loader.js:562:25)     at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)     at...

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

619. 射线检测-碰撞器混合 [ 66%]

... ]; Laya.loader.create(resource, Laya.Handler.create(this, onLoadFinish)); function onLoadFinish() { this.scene = Laya.stage.addChild(Laya.Scene.load("../../res/threeDimen/scene/ColliderScene/ColliderDemo.ls")); //初始化照相机 this.camera = this.scene.addChild(new Laya.Camera(0, 0.1, 100)); th...

来源: Laya_示例 发布时间: 20261113

620. LayaNative二次开发问题? [ 66%]

LayaNative二次开发问题? LayaAir里面的js方法 _proto.init = function(){ // a、创建Test类 var Test=Laya.PlatformClass.createClass("com.coin.test.TestOne"); // 这个名字要与下面声明的Java的类名匹配. 包名+类名 var a = false; // 注册手指按下事件 document.addEve...

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