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

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

1. 鼠标交互-鼠标交互 [ 100%]

... Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, 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...

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

2. 区块地图-滚动地图 [ 96%]

...tage.SCALE_FULL; Stat.show(); createMap(); Laya.stage.on(Event.MOUSE_DOWN, this, mouseDown); Laya.stage.on(Event.MOUSE_UP, this, mouseUp); })(); //创建地图 function createMap() { //创建地图对象 tiledMap = new TiledMap(); mX = mY = 0; //创建地图,适当的时候调用destory销毁地...

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

3. 骨骼动画-Spine事件 [ 96%]

...spineRes6/alien.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.on(Event.ERROR, this, onError); mFactory.loadAni(mAniPath); } function onError() { trace("error"); } function parseComplete() { //创建模式为1,可以启用换装 mArmature = mFactory.build...

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

4. 屏幕适配-屏幕适配 [ 96%]

...le)"; 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", thi...

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

5. 骨骼动画-多纹理 [ 96%]

...pineRes1/dragon.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.on(Event.ERROR, this, onError); mFactory.loadAni(mAniPath); } function onError() { trace("error"); } function parseComplete() { //创建模式为1,可以启用换装 mArmature = mFactory.build...

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

6. 骨骼动画-藤蔓 [ 96%]

.../spineRes5/vine.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.on(Event.ERROR, this, onError); mFactory.loadAni(mAniPath); } function onError() { console.log("error"); } function parseComplete() { //创建模式为1,可以启用换装 mArmature = mFactory...

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

7. 骨骼动画-橡胶人 [ 96%]

...es4/stretchyman.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.on(Event.ERROR, this, onError); mFactory.loadAni(mAniPath); } function onError() { console.log("error"); } function parseComplete() { //创建模式为1,可以启用换装 mArmature = mFactory...

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

8. 骨骼动画-换装 [ 95%]

...ineRes2/goblins.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.on(Event.ERROR, this, onError); mFactory.loadAni(mAniPath); } function onError() { trace("error"); } function parseComplete() { //创建模式为1,可以启用换装 mArmature = mFactory.build...

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

9. 鼠标交互-双指旋转(多点触控) [ 95%]

...(); })(); function setup() { createSprite(); Laya.stage.on(Event.MOUSE_UP, this, onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, onMouseUp); } function createSprite() { sp = new Sprite(); var w = 200, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.po...

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

10. 鼠标交互-双指缩放(多点触控) [ 95%]

...(); })(); function setup() { createSprite(); Laya.stage.on(Event.MOUSE_UP, this, onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, onMouseUp); } function createSprite() { sp = new Sprite(); var w = 300, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.po...

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