大约有 1,162 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0074 秒)
Laya_社区(657) Laya_示例(157) Laya2.0_文档(129) Laya2.0_示例(116) Laya3.0_api(72) Laya3.0_文档(11) laya_api(11) Laya2.0_api(9)
....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
...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
...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
...设置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
...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
...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
...指针要变成可点击的指针“小手的样子”,求大神解析 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
...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
... ]; 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
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