大约有 36 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0021 秒)
...帧频旋转", rotateTimeBasedText.x, rotateTimeBasedText.y + vGap); Laya.timer.loop(200, this, animateTimeBased); Laya.timer.frameLoop(2, this, animateFrameRateBased); } function createText(text, x, y) { var t = new Text(); t.text = text; t.fontSize = 30; t.color = "white"; t.bold = true; t.pivot(t...
来源: Laya_示例 发布时间: 20241117
...rate(); })(); function demonstrate() { for (var i = 0; i < 10; i++) { Laya.timer.callLater(this, onCallLater); } } function onCallLater() { console.log("onCallLater triggered"); var text = new Text(); text.font = "SimHei"; text.fontSize = 30; text.color = "#FFFFFF"; text.text = "打开控制台可...
来源: Laya_示例 发布时间: 20241117
...nt.CLICK, this, onDecreaseAlpha1); //定时执行一次(间隔时间) Laya.timer.once(3000, this, onComplete1); } function onDecreaseAlpha2(e) { //移除鼠标单击事件 button2.off(Event.CLICK, this, onDecreaseAlpha2); //定时执行一次(基于帧率) Laya.timer.frameOnce(60, this, onComplete2)...
来源: Laya_示例 发布时间: 20241117
...n onApePress(e) { // 鼠标按下后,HOLD_TRIGGER_TIME毫秒后hold Laya.timer.once(HOLD_TRIGGER_TIME, this, onHold); Laya.stage.on(Event.MOUSE_UP, this, onApeRelease); } function onHold() { Tween.to(ape, { "scaleX": 1, "scaleY": 1 }, 500, Ease.bounceOut); isApeHold = true; } /** 鼠标放开后...
来源: Laya_示例 发布时间: 20241117
...ance.on(Laya.Event.CHANGE, this, monitorAccelerator); // 游戏循环 Laya.timer.frameLoop(1, this, animate); // 食物生产 Laya.timer.loop(3000, this, produceFood); // 游戏开始时有一个食物 produceFood(); })() function initSnake() { for (var i = 0; i 0) { var prevSeg = segments[segments....
来源: Laya_示例 发布时间: 20241117
...55, 72); ape.x = Laya.stage.width / 2; ape.y = Laya.stage.height / 2; Laya.timer.frameLoop(1, this, animate); } function animate(e) { ape.rotation += 2; //心跳缩放 scaleDelta += 0.02; var scaleValue = Math.sin(scaleDelta); ape.scale(scaleValue, scaleValue); } })();module laya { import Sprite = L...
来源: Laya_示例 发布时间: 20241117
...d() { maggotTexture = Laya.loader.getRes(texturePath); initMaggots(); Laya.timer.frameLoop(1, this, animate); } function initMaggots() { var maggotContainer; for (var i = 0; i wb.x + wb.width) x -= wb.width; if (y wb.y + wb.height) y -= wb.height; maggot.pos(x, y); } tick += 0.1; } })();module laya ...
来源: Laya_示例 发布时间: 20241117
...dler = new Handler(this, onChange); Laya.stage.addChild(progressBar); Laya.timer.loop(100, this, changeValue); } function changeValue() { if (progressBar.value >= 1) progressBar.value = 0; progressBar.value += 0.05; } function onChange(value) { console.log("进度:" + Math.floor(value * 100) + "%"...
来源: Laya_示例 发布时间: 20241117
...ild(ape); } apesCtn.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.timer.frameLoop(1, this, animate); } function animate(e) { apesCtn.rotation += 1; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = Laya.Browser; import W...
来源: Laya_示例 发布时间: 20241117
...一只猩猩的子级 Laya.stage.addChild(ape1); ape1.addChild(ape2); Laya.timer.frameLoop(1, this, animate); } function animate(e) { ape1.rotation += 2; ape2.rotation -= 4; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = Laya....
来源: Laya_示例 发布时间: 20241117