大约有 20 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0021 秒)
...TypeScript三种开发语言、LayaAirIDE让项目开发更高效。class Timer_Interval { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height...
来源: Laya2.0_示例 发布时间: 20241117
...TypeScript三种开发语言、LayaAirIDE让项目开发更高效。class Timer_CallLater { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage...
来源: Laya2.0_示例 发布时间: 20241117
...TypeScript三种开发语言、LayaAirIDE让项目开发更高效。class Timer_DelayExcute { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.hei...
来源: Laya2.0_示例 发布时间: 20241117
...ent = Laya.Event; // 鼠标按下后,HOLD_TRIGGER_TIME毫秒后hold Laya.timer.once(HOLD_TRIGGER_TIME, this, this.onHold); Laya.stage.on(Event.MOUSE_UP, this, this.onApeRelease); } onHold() { const Tween = Laya.Tween, Ease = Laya.Ease; Tween.to(this.ape, { "scaleX": 1, "scaleY": 1 }, 500, Ease.bou...
来源: Laya2.0_示例 发布时间: 20241117
...ance.on(Event.CHANGE, this, this.monitorAccelerator); // 游戏循环 Laya.timer.frameLoop(1, this, this.animate); // 食物生产 Laya.timer.loop(3000, this, this.produceFood); // 游戏开始时有一个食物 this.produceFood(); } initSnake() { const Point = Laya.Point; for (let i = 0; i 0) { let...
来源: Laya2.0_示例 发布时间: 20241117
...e.width / 2; this.ape.y = Laya.stage.height / 2; this.scaleDelta = 0; Laya.timer.frameLoop(1, this, this.animate); } animate() { this.ape.rotation += 2; //心跳缩放 this.scaleDelta += 0.02; let scaleValue = Math.sin(this.scaleDelta); this.ape.scale(scaleValue, scaleValue); } } new Sprite_RoateAnd...
来源: Laya2.0_示例 发布时间: 20241117
...s ); } this.apesCon.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.timer.frameLoop(1, this, this.animate); } animate() { this.apesCon.rotation += 1; } } new Sprite_Container();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = La...
来源: Laya2.0_示例 发布时间: 20241117
... maggotTexture = Laya.loader.getRes(texturePath); this.initMaggots(); Laya.timer.frameLoop(1, this, this.animate); } initMaggots() { let maggotContainer; for (let 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; } } new PerformanceTest...
来源: Laya2.0_示例 发布时间: 20241117
..."; this.progressBar.changeHandler = new Handler(this, this.onChange); Laya.timer.loop(100, this, this.changeValue); } changeValue() { if (this.progressBar.value >= 1) { this.progressBar.value = 0; } this.progressBar.value += 0.05; } onChange(value) { console.log("进度:" + Math.floor(value * 100)...
来源: Laya2.0_示例 发布时间: 20241117
...oint.enableMotor = true; box.addComponentIntance(revoluteJoint); Laya.Laya.timer.frameLoop(1, this, this.addMiniBox); } addMiniBox() { let box = this.box; if (this.count >= this.totalBox) { return; } let sp = new Laya.Sprite(); Laya.Laya.stage.addChild(sp); sp.x = box.x; sp.y = box.y; sp.addComponen...
来源: Laya2.0_示例 发布时间: 20241117