大约有 55 项符合查询结果, 库内数据总量为 30,784 项。 (搜索耗时: 0.0041 秒)
...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
...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
....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; } set weight(value: number) { this._weight = value; } } 2.3 是否序列化保存 通过装饰器定义为组件属性后...
来源: Laya3.0_文档 发布时间: 20241014
...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
...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
各位大佬,帮我看看 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
... 动画是否出于播放状态 */ isPlayIng:boolean = false /** 空格 */ <em>privateem> space:string = "<span> </span>" constructor() { super() this.width = 1200 this.height = 55 this.visible = false this.pos(565,150) this._createHorn() this....
来源: Laya_社区 发布时间: 20180314
...讯*/ export class Socket extends Laya.EventDispatcher { <em>privateem> pomelo: Pomelo; <em>privateem> mDecorate:Decorate;//装饰器 <em>privateem> mHost: string; <em>privateem> mPort: number; <em>privateem> mConnected: boolean; /** 开启*/ pu...
来源: Laya_社区 发布时间: 20161109