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

大约有 1,470 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0072 秒)

91. 分享一个自己做的游戏公告功能,跑马灯效果 [ 92%]

...left" this.html.style.color = "#fff" this.html.innerHTML = "" this.hornBox.addChild(this.html) this.addChild(this.hornBox) } /** 滚动动画 */ private _animate(e: Event): void { const _w = this.html.width const _x = this.html.x if (_x < -_w) { this.stop(true) } else { this.html.x -= 2 } } /** ...

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

92. UI-ScrollBar [ 92%]

....HScrollBar, Handler = Laya.Handler; let hs = new HScrollBar(); Laya.stage.addChild(hs); hs.skin = "res/ui/hscroll.png"; hs.width = 300; hs.pos(50, 170); hs.min = 0; hs.max = 100; hs.changeHandler = new Handler(this, this.onChange); } placeVScroller() { const VScrollBar = Laya.VScrollBar, Handler = ...

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

93. 射线检测-碰撞器混合 [ 92%]

...te(this, onLoadFinish)); function onLoadFinish() { this.scene = Laya.stage.addChild(Laya.Scene.load("../../res/threeDimen/scene/ColliderScene/ColliderDemo.ls")); //初始化照相机 this.camera = this.scene.addChild(new Laya.Camera(0, 0.1, 100)); this.camera.transform.translate(new Laya.Vector3(0, ...

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

94. BackGround.super(this);这个报错 Cannot read property 'call' of undefined [ 92%]

...tion shouye(){ Laya.init(100,300); this.bgimg=new BackGround(); Laya.stage.addChild(this.bgimg); })(); return shouye; })(); var BackGround = (function (_super) { function BackGround() { BackGround.super(this); this.bg=new Laya.sprite; this.bg.loaImage("war/beijing.png"); this.addchild(this.bg);  ...

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

95. Sprite-容器 [ 92%]

...us = 150; var radianUnit = Math.PI / 2; apesCtn = new Sprite(); Laya.stage.addChild(apesCtn); // 添加4张猩猩图片 for (var i = 0; i < 4; i++) { var ape = new Sprite(); ape.loadImage("../../res/apes/monkey" + i + ".png"); ape.pivot(55, 72); // 以圆周排列猩猩 ape.pos( Math.cos(radianUnit ...

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

96. 材质-BlinnPhong-漫反射贴图 [ 92%]

...eenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene = Laya.stage.addChild(new Laya.Scene()); var camera = (scene.addChild(new Laya.Camera(0, 0.1, 100))); camera.transform.translate(new Laya.Vector3(0, 0.5, 1.5)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); camera.cle...

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

97. 计时器-延迟执行 [ 92%]

...2; button1.y = (Laya.stage.height - 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...

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

98. UI-Slider [ 92%]

...0; hs.tick = 1; hs.changeHandler = new Handler(this, onChange); Laya.stage.addChild(hs); } function placeVSlider() { var vs = new VSlider(); vs.skin = "../../res/ui/vslider.png"; vs.height = 300; vs.pos(400, 50); vs.min = 0; vs.max = 100; vs.value = 50; vs.tick = 1; vs.changeHandler = new Handler(th...

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

99. 2D物理-复合碰撞器 [ 92%]

...pivot(box.width / 2, box.height / 2); box.pos(posx, posy); Laya.Laya.stage.addChild(box); let boxBody = box.addComponent(Laya.RigidBody); let box1Shape = box.addComponent(Laya.BoxCollider); let box2Shape = box.addComponent(Laya.BoxCollider); let box3Shape = box.addComponent(Laya.BoxCollider); let bo...

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

100. 材质-BlinnPhong-反射贴图 [ 92%]

...eenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene = Laya.stage.addChild(new Laya.Scene()); var camera = (scene.addChild(new Laya.Camera(0, 0.1, 100))); camera.transform.translate(new Laya.Vector3(0, 1.3, 1.8)); camera.transform.rotate(new Laya.Vector3(-30, 0, 0), true, false); camera.cle...

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