大约有 57 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0057 秒)
...{ import laya.display.Sprite; import laya.events.Event; public class Btn { <em>privateem> var _owner:Sprite; <em>privateem> var _isScal:Boolean; public function Btn() { trace("btn的附加类已经开始执行"); } //设置owner函数,可以直接获取到Button组件的实例 public function set owner(v:Sprite...
来源: Laya_社区 发布时间: 20161014
...n(Event.CLICK,this, onsp); Laya.stage.addChild(sp); } <em>privateem> function onsp(e:Event){ console.log("监听到按钮"+e.target); console.log((e.target.getChildAt(0) as Sprite).name); console.log(e.target.name) } ...
来源: Laya_社区 发布时间: 20170330
...s://my.oschina.net/u/659068/blog/1564002 class Ball extends Laya.Sprite{ <em>privateem> static cached:boolean = false; <em>privateem> body:Laya.Sprite; constructor(){ super(); this.init(); } public init():void{ if(!Ball.cached){ Ball.cached = true; this.body = new Laya.Sprite(); this.body.loadImage("war/ball.pn...
来源: Laya_社区 发布时间: 20171108
....stage.on(Laya.Event.MOUSE_WHEEL, this, this.mouseRoll); } // 鼠标滚动 <em>privateem> mouseRoll(e: Laya.Event): void { let value: number = e.delta; if (value > 0) {//滚轮滑动增量大于0,向上滚动 } else {//滚轮滑动增量小于0,向下滚动 } console.log(`____________鼠标滚动_______...
来源: Laya_社区 发布时间: 20180411
...如下: const { regClass, property } = Laya; @regClass() class Animal { <em>privateem> _weight: number = 0; @property( { type : Number } ) get weight() : number { return this._weight; } //如果没有 Setter,则 weight 为只读属性 set weight(value: number) { this._weight = value; } } 2.3 是否序...
来源: Laya3.0_文档 发布时间: 20251010
...rt laya.utils.Handler; import laya.webgl.WebGL; public class LayaAirDemo { <em>privateem> const AniConfPath:String = "fighter/fighter.json"; public function LayaAirDemo() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN...
来源: Laya_社区 发布时间: 20170628
...mouseHandler方法来获取 list.mouseHandler=new Handler(this,onClick); } <em>privateem> function onClick(e:Event,index:int):void { if(e.type==Event.CLICK) { trace("xy:"+list.getCell(index).x,list.getCell(index).y); } }上面的坐标是相对于list本身的,如果你想取得全局坐标可以通过lo...
来源: Laya_社区 发布时间: 20161215
各位大佬,帮我看看 tiledMap 中获取不到自定义属性 ``` <em>privateem> onkeydown(e: KeyboardEvent): void { // var b = mapLayer.getLayerProperties(0, 44, "isCanPass"); // var tileY = mapLayer.getTileDataByScreenPos(screenX, screenY); // var data = this.tiledMap.getLayerByIndex(3).getTileD...
来源: Laya_社区 发布时间: 20230605
...uest; import flash.utils.ByteArray; public class UrlImage extends Sprite { <em>privateem> var urlLoader:URLLoader; <em>privateem> var l:Loader; public function UrlImage() { super(); if(stage) { init(); } else { this.addEventListener(Event.ADDED_TO_STAGE,init); } } <em>privateem> function init(e:Event=null):void { urlLoa...
来源: Laya_社区 发布时间: 20151228
...dle size 10479616, width 1080, height 2408, stride 4352, fd 8, format: <<em>privateem>>, phy 0x0, usage 0xb, viraddr 0x0000000000000000 01-06 17:34:41.531 902 1210 I C01401/Bufferqueue: <163>Alloc: buffer handle size 10479616, width 1080, height 2408, stride 4352, fd 106, transform 0 01-06 17:3...
来源: Laya_社区 发布时间: 20250106