大约有 8 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0026 秒)
...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_示例 发布时间: 20241118
...1; var current = 0; var objs = 17; var vx = 0; var vy = 0; var vz = 0; var points1 = []; var points2 = []; var points3 = []; var tpoint1 = []; var tpoint2 = []; var tpoint3 = []; var balls = []; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); ...
来源: Laya2.0_示例 发布时间: 20241118
.../ 游戏开始时有一个食物 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_示例 发布时间: 20241118
... 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_示例 发布时间: 20241118
...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_示例 发布时间: 20241118
...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_示例 发布时间: 20241118
...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_示例 发布时间: 20241118
...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_示例 发布时间: 20241118