• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 1,400 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0052 秒)

261. 音频-播放演示 [ 77%]

...() { console.log("播放完成"); } } new Sound_SimpleDemo();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Text = Laya.Text; import Event = Laya.Event; import SoundManager = Laya.SoundManager; import Browser = Laya.Browser; import Handler = Laya.Handler; import WebGL =...

来源: Laya2.0_示例 发布时间: 20251130

262. Sprite-轴心点 [ 77%]

...tation += 2; this.ape2.rotation += 2; } } new Sprite_Pivot();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Sprite_Pivot { private sp1: Sprite; private sp2: Sprite; constructor() ...

来源: Laya2.0_示例 发布时间: 20251130

263. 音频-播放演示 [ 77%]

... function onComplete() { console.log("播放完成"); } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Text = Laya.Text; import Event = Laya.Event; import SoundManager = Laya.SoundManager; import Browser = Laya.Browser; import Handler = Laya.Handler; import WebGL =...

来源: Laya_示例 发布时间: 20251130

264. Sprite-遮罩-放大镜 [ 77%]

....x = Laya.stage.mouseX; maskSp.y = Laya.stage.mouseY; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Browser = Laya.Browser; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class Sprite_MagnifyingGlass { private maskSp:Sprite; private bg2:Sprite;...

来源: Laya_示例 发布时间: 20251130

265. 骨骼动画-换装 [ 77%]

...ature.play(mCurrIndex, false); } } new Skeleton_ChangeSkin();module laya { import Skeleton = Laya.Skeleton; import Templet = Laya.Templet; import Event = Laya.Event; import Browser = Laya.Browser; import Stat = Laya.Stat; import WebGL = Laya.WebGL; export class ChangeSkin { private mAniPath:string; ...

来源: Laya2.0_示例 发布时间: 20251130

266. 文本-字符限制 [ 77%]

...adding = [0, 4, 0, 4]; return input; } } new Text_Restrict();module laya { import Input = Laya.Input; import Stage = Laya.Stage; import Text = Laya.Text; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_Restrict { constructor() { // 不支持WebGL时自动切换至Canvas L...

来源: Laya2.0_示例 发布时间: 20251130

267. 引用MiniAdpter 类,微信开发者工具上运行,加载外部资源必定失败 [ 77%]

...a_Aaron 赞同来自: 祈祷 Laya["MiniAdpter"] 用这种写法可以避免import 就会正常, 引擎默认 引了js的,不需要编译as的 或者在game.js中把 js的去掉引用 只import As的 即可 ,不然会冲突 2019-03-25 1 0 分享 微博 QZONE 微信 祈祷 赞同来自: 例子...

来源: Laya_社区 发布时间: 20190324

268. 鼠标交互-Hold [ 77%]

...USE_UP, this, this.onApeRelease); } } new Interaction_Hold();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Texture = Laya.Texture; import Browser = Laya.Browser; import Ease = Laya.Ease; import Handler = Laya.Handler; import Tween = Laya.Twee...

来源: Laya2.0_示例 发布时间: 20251130

269. 动效模板(ActionScript-LayaAir基础篇(AS3)-动画基础) [ 77%]

...并设置为默认应用程序。编写代码如下: ```java package { import laya.net.Loader; import laya.utils.Handler; import ui.EffectAnimationDemoUI; public class Main { public function Main() { //初始化舞台 Laya.init(1334,750); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" //...

来源: Laya2.0_文档 发布时间: 20210715

270. 加载-单一类型资源加载 [ 77%]

...getRes("../../res/apes/monkey2.png"); // 使用资源 } })();module laya { import Loader = Laya.Loader; import Texture = Laya.Texture; import Handler = Laya.Handler; export class Loader_SingleType { constructor() { Laya.init(550, 400); // 加载一张png类型资源 Laya.loader.load("../../res/apes/...

来源: Laya_示例 发布时间: 20251130