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

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

1. 输入设备-指南针 [ 100%]

...= Laya.WebGL; var Event = Laya.Event; var compassImgPath = "../../res/inputDevice/kd.png"; var compassImg; var degreesText; var directionIndicator; var firstTime = true; (function() { Laya.init(700, 1024, WebGL); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.alignH = Stage.ALIGN_CENTER; Lay...

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

2. 输入设备-贪吃蛇(重力感应) [ 98%]

...r; import WebGL = Laya.WebGL; import Event = Laya.Event; export class InputDevice_GluttonousSnake { private seg:Segment; private segments:Array = []; private foods:Array = []; private initialSegmentsAmount:number = 5; private vx:number = 0 private vy:number = 0; private targetPosition:Point; constru...

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

3. 输入设备-地图 [ 98%]

...t Browser = Laya.Browser; import Handler = Laya.Handler; export class InputDevice_Map { // 百度地图 private map; private marker; private BMap = Browser.window.BMap; private convertor = new this.BMap.Convertor(); // Div private mapDiv; private infoText:Text; constructor() { Laya.init(Browser.widt...

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

4. 输入设备-摇一摇 [ 89%]

...akePic() { var shakePic = new Sprite(); shakePic.loadImage("../../res/inputDevice/shake.png"); Laya.stage.addChild(shakePic); } function showConsoleText() { console = new Text(); Laya.stage.addChild(console); console.y = picH + 10; console.width = Laya.stage.width; console.height = Laya.stage.height...

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