大约有 2,023 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0065 秒)
Laya_社区(1419) Laya2.0_文档(233) Laya_示例(141) Laya2.0_示例(117) Laya3.0_api(61) Laya3.0_文档(39) Laya2.0_api(7) laya_api(6)
...ructor() { Laya.WebGL.enable(); Laya.init(1000, 900); //创建动画模板 this.templet = new Laya.Templet(); this.templet.on(Laya.Event.COMPLETE, this, this.parseComplete); this.templet.on(Laya.Event.ERROR, this, this.onError); this.templet.loadAni("res/spine/goblins/goblins.sk"); } onError() { con...
来源: Laya2.0_文档 发布时间: 20210715
...e; public function Game() { //初始化引擎 Laya.init(600, 400,WebGL);// this.byte = new Byte(); this.byte.endian = Byte.LITTLE_ENDIAN;//这里我们采用小端; this.socket = new Socket(); this.socket.endian = Byte.LITTLE_ENDIAN;//这里我们采用小端; this.socket.connectByUrl("ws://loca...
来源: Laya2.0_文档 发布时间: 20210715
... 用法: var texture: Laya.Texture = Laya.Loader.getRes("progress.png"); this.spe = new coolDownSprite(); this.spe.init(texture); //this.spe.initWithoutTexture(128, 128); this.spe.pos(300, 350); this.spe.setProgress(this.progress); Laya.stage.addChild(this.spe); ----------------------源码-------...
来源: Laya_社区 发布时间: 20170606
...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; let vGap = 100; this.button1 = this.createButton("点我3秒之后 alpha - 0.5"); this.button1.x = (Laya.stage.width - this.button1.width) / 2; this.button1.y = (Laya.stage....
来源: Laya2.0_示例 发布时间: 20241117
...r tileY = mapLayer.getTileDataByScreenPos(screenX, screenY); // var data = this.tiledMap.getLayerByIndex(3).getTileData(tileX, tileY); // console.log(data) // console.log(Laya.Keyboard.RIGHT) switch (e.keyCode) { //右边 case 39: { this.player.x += 16 break; } case 37: { //左边 this.player.x -= 1...
来源: Laya_社区 发布时间: 20230605
...apFont(); bitmapFont.loadFont("../../res/bitmapFont/test.fnt", new Handler(this, onFontLoaded, [bitmapFont])); } function onFontLoaded(bitmapFont) { bitmapFont.setSpaceWidth(10); Text.registerBitmapFont(fontName, bitmapFont); createText(fontName); } function createText(font) { var txt = new Text(); ...
来源: Laya_示例 发布时间: 20241117
...erDerivePhysicsTransformation(physicTransformOut, force) { var transform = this.owner._transform; if (force || this._getTransformFlag(Laya.Transform3D.TRANSFORM_WORLDPOSITION)) { var shapeOffset = this._colliderShape.localOffset; var position = transform.position; var btPosition = CannonPhysicsCompo...
来源: Laya_社区 发布时间: 20210904
...E 微信 189*****192 赞同来自: 他也是自己写的 监听滑动 this._list.on(fairygui.Events.SCROLL, this, this.doSpecialEffect); 通过cell 距离 设置他的缩放比 MainPanel.prototype.doSpecialEffect = function () { //change the scale according to the distance to the mi...
来源: Laya_社区 发布时间: 20180719
...loader.load("res/cartoonCharacters/cartoonCharactors.json", Handler.create(this, this.createCharacters), null, Loader.ATLAS); } createCharacters() { characterGroup = []; for(let i = 0; i = 0; --i) { this.animateCharactor(characterGroup[i]); } } animateCharactor(charactor) { charactor.x += moveSpeed;...
来源: Laya2.0_示例 发布时间: 20241117
...alSpace: number = 5; private sprite: Laya.Sprite; constructor() { super(); this.sprite = new Laya.Sprite(); } drawText(x: number, y: number, w: number, h: number) { console.log(2222); var j = 0;//控制行列 var printNumber = 0;//当前输出字数 var fonts = this.fontSize + "px" + " " +this.font ...
来源: Laya_社区 发布时间: 20191103