大约有 10 项符合查询结果, 库内数据总量为 30,786 项。 (搜索耗时: 0.0030 秒)
...rameLoop(1, this, this.animate); } animate() { const Sprite = Laya.Sprite, Point = Laya.Point; let laser; if (tick > frequency) { tick = 0; // iterate through the dudes and update the positions laser = new Sprite(); laser.loadImage("res/pixi/laser0" + ((type % 5) + 1) + ".png"); type++; laser.life =...
来源: Laya2.0_示例 发布时间: 20241124
...oZoom(); // 初始地点北京,缩放系数15 map.centerAndZoom(new BMap.Point(116.32715863448607, 39.990912172420714), 15); // 创建标注物 marker = new BMap.Marker(new BMap.Point(0,0)); map.addOverlay(marker); let label = new BMap.Label("当前位置", { offset: new BMap.Size(-15, 30) }); mar...
来源: Laya2.0_示例 发布时间: 20241124
... createMap() { const TiledMap = Laya.TiledMap, Rectangle = Laya.Rectangle, Point = Laya.Point; this.tiledMap = new TiledMap(); this.tiledMap.createMap("res/tiledMap/isometric_grass_and_water.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Laya.Handler.create(this, this.mapLoaded), n...
来源: Laya2.0_示例 发布时间: 20241124
...let chainCollider = ground.addComponent(Laya.ChainCollider); chainCollider.points = "50,600,1050,600"; let point1 = new Laya.Sprite(); Laya.Laya.stage.addChild(point1); point1.pos(startPosX, startPosY); let pointRB1 = new Laya.RigidBody(); pointRB1.type = "static"; point1.addComponentIntance(pointRB...
来源: Laya2.0_示例 发布时间: 20241124
.../ 游戏开始时有一个食物 this.produceFood(); } initSnake() { const Point = Laya.Point; for (let i = 0; i 0) { let prevSeg = segments[segments.length - 1]; seg.rotation = prevSeg.rotation; let point = seg.getPinPosition(); seg.x = prevSeg.x - point.x; seg.y = prevSeg.y - point.y; } segments.p...
来源: Laya2.0_示例 发布时间: 20241124
...this.onMouseMove); } /**计算两个触摸点之间的距离*/ getDistance(points) { let distance = 0; if (points && points.length == 2) { let dx = points[0].stageX - points[1].stageX; let dy = points[0].stageY - points[1].stageY; distance = Math.sqrt(dx * dx + dy * dy); } return distance; } } new I...
来源: Laya2.0_示例 发布时间: 20241124
...let chainCollider = ground.addComponent(Laya.ChainCollider); chainCollider.points = "50,200,50,570,1050,570,1050,200"; for (let i = 1; i 0) { legCollider1.points = p1.concat(p2).concat(p3).join(","); legCollider2.points = [0, 0].concat(B2Math.SubVV(p5, p4)).concat(B2Math.SubVV(p6, p4)).join(","); } ...
来源: Laya2.0_示例 发布时间: 20241124
...let chainCollider = ground.addComponent(Laya.ChainCollider); chainCollider.points = "50,400,50,600,1050,600,1050,400"; let sensorCollider = this.sensorCollider = ground.addComponent(Laya.CircleCollider); sensorCollider.isSensor = true; sensorCollider.radius = 100; sensorCollider.x = 450; sensorColli...
来源: Laya2.0_示例 发布时间: 20241124
...a.WebGL; Animation = Laya.Animation; Label = Laya.Label; Text = Laya.Text; Point = Laya.Point; Tween = Laya.Tween; TextArea = Laya.TextArea; class UI_RefreshList { constructor() { this.baseBox = null; this.refreshLoading = null; this.loadingAni = null; this.loadingLabel = null; this.refreshList = nu...
来源: Laya2.0_示例 发布时间: 20241124
...ouse.addComponent(ChainCollider); chainCollider.loop = true; chainCollider.points = "600,50,100,200,100,600,1100,600,1100,200"; } private function createBox(posx, posy, width, height, ratio) { var box = new Sprite(); box.on(Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.addChild(box); box.pos(p...
来源: Laya2.0_示例 发布时间: 20241124