大约有 13 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0023 秒)
... mouseHandler); rect.on(Event.MOUSE_UP, this, mouseHandler); rect.on(Event.CLICK, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_UP, this, mouseHandler); rect.on(Event.RIGHT_CLICK, this, mouseHandler); rect.on(Event.MOUSE_MOVE, this, mouseHandler)...
来源: Laya_示例 发布时间: 20241117
...(noscale)"; 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...
来源: Laya_示例 发布时间: 20241117
...,代码里面能直接使用,并且有代码提示 this.btn.on(Event.CLICK, this, onBtnClick); this.btn2.on(Event.CLICK, this, onBtn2Click); function onBtnClick() { //手动控制组件属性 this.radio.selectedIndex = 1; this.clip.index = 8; this.tab.selectedIndex = 2; this.combobox.selectedInd...
来源: Laya_示例 发布时间: 20241117
...button1.height - vGap) / 2; Laya.stage.addChild(button1); button1.on(Event.CLICK, this, onDecreaseAlpha1); button2 = createButton("点我60帧之后 alpha - 0.5"); button2.pos(button1.x, button1.y + vGap); Laya.stage.addChild(button2); button2.on(Event.CLICK, this, onDecreaseAlpha2); } function crea...
来源: Laya_示例 发布时间: 20241117
....y = soundButton.y; Laya.stage.addChild(musicButton); soundButton.on(Event.CLICK, this, onPlaySound); musicButton.on(Event.CLICK, this, onPlayMusic); } function createButton(label) { var w = 110; var h = 40; var button = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"...
来源: Laya_示例 发布时间: 20241117
...p); sp.on(ROTATE, this, onRotate); // 侦听自定义的事件 sp.on(Event.CLICK, this, onSpriteClick); } function onSpriteClick(e) { var randomAngle = Math.random() * 180; //发送自定义事件 sp.event(ROTATE, [randomAngle]); } // 触发自定义的rotate事件 function onRotate(newAngle) { Twee...
来源: Laya_示例 发布时间: 20241117
... 2, Laya.stage.height / 2); // 显示默认纹理 switchTexture(); ape.on("click", this, switchTexture); } function switchTexture() { var textureUrl = (flag = !flag) ? texture1 : texture2; // 更换纹理 ape.graphics.clear(); var texture = Laya.loader.getRes(textureUrl); ape.graphics.drawTexture(te...
来源: Laya_示例 发布时间: 20241117
....height - 100 * Laya.Browser.pixelRatio); changeActionButton.on(Laya.Event.CLICK, this, function () { //根据名称播放动画 zombieAnimator.play(clipName[++curStateIndex % clipName.length]); }); })); }class SkinAnimation_New { private changeActionButton: Laya.Button; private zombieAnimator: Laya...
来源: Laya_示例 发布时间: 20241117
...SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createMap(); Laya.stage.on("click", this, onStageClick); })(); function createMap() { tiledMap = new TiledMap(); tiledMap.createMap("../../res/tiledMap/isometric_grass_and_water.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.cr...
来源: Laya_示例 发布时间: 20241117
...cacheAs = "bitmap"; Laya.stage.addChild(guideContainer); gameContainer.on("click", this, nextStep); //绘制遮罩区,含透明度,可见游戏背景 var maskArea = new Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); guideContaine...
来源: Laya_示例 发布时间: 20241117