大约有 517 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0050 秒)
...Length) / 2; button.y = Laya.stage.height / 2; button.on(Event.MOUSE_DOWN, this, onMouseDown); Laya.stage.addChild(button); //左侧临界点设为圆形初始位置 beginPosition = button.x; //右侧临界点设置 endPosition = beginPosition + TrackLength; } function drawTrack() { var graph = new ...
来源: Laya_示例 发布时间: 20241117
...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Sprite = Laya.Sprite, Tween = Laya.Tween; let terminalX = 200; let characterA = this.createCharacter("res/cartoonCharacters/1.png"); characterA.pivot(46.5, 50); characterA.y = 100; let characte...
来源: Laya2.0_示例 发布时间: 20241117
...舞台 Laya.stage.name = "暗灰色舞台" Laya.stage.on(Event.MOUSE_DOWN, this, onDown); } function createCoralRect() { var coralRect = new Sprite(); coralRect.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height / 2, "#FF7F50"); //设置名称 coralRect.name = "珊瑚色容器"; coralRect.s...
来源: Laya_示例 发布时间: 20241117
...态 ani.play("attack"); //等待动画播放完成 Laya.timer.frameLoop(1,this,function():void{ //如果当前播放state已经播放完了一次 if(ani.getCurrentAnimatorPlayState().normalizedTime >= 1){ //回到站立状态 ani.play("stand"); } }); } ``` ![](img/6.gif)(图6)
来源: Laya2.0_文档 发布时间: 20210715
...le)"; txt.bold = true; txt.pos(0, 200); txt.fontSize = 30; txt.on("click", this, onTxtClick); Laya.stage.addChild(txt); //实例一个小人,放到右上角,并相对布局 var boy1 = new Image(); boy1.skin = "../../res/cartoonCharacters/1.png"; boy1.top = 0; boy1.right = 0; boy1.on("click", thi...
来源: Laya_示例 发布时间: 20241117
...a.stage.bgColor = "#232628"; Laya.loader.load(apePath, Laya.Handler.create(this, this.setup)); } setup() { this.normalizeApe(); this.makeRedApe(); this.grayingApe(); } normalizeApe() { let originalApe = this.createApe(); originalApe.x = (Laya.stage.width - apeTexture.width * 3) / 2; originalApe.y = ...
来源: Laya2.0_示例 发布时间: 20241117
...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createTexts(); } private createTexts(): void { this.createLabel("只允许输入数字:").pos(50, 20); var input: Input = this.createInput(); input.pos(50, 50); input.restrict = "0-9"; this.createLabel("只允许输入...
来源: Laya_示例 发布时间: 20241117
...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createInput(); } createInput() { const Text = Laya.Text; let t1 = this.createText(); t1.overflow = Text.VISIBLE; t1.pos(10, 10); let t2 = this.createText(); t2.overflow = Text.SCROLL; t2.pos(10, 110); let t3 = this.creat...
来源: Laya2.0_示例 发布时间: 20241117
...../res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh", Laya.Handler.create(this, onComplete)); function onComplete() { layaMonkey1 = scene.addChild(Laya.Sprite3D.load("../../res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh")); layaMonkey2 = Laya.Sprite3D.instantiate(layaMonkey1, scene, false, new L...
来源: Laya_示例 发布时间: 20241117
... bg = CreateObj.createSprite(McUrlMgr.LOAD_BG_Path); this.addChild(bg); bg.x = 0; bg.y = 0; var bg2:Sprite = CreateObj.createSprite(McUrlMgr.LOAD_BG_Path); bg2.x = 0; ...
来源: Laya_社区 发布时间: 20161223