大约有 87 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0035 秒)
Laya_社区(56) Laya2.0_文档(8) Laya_示例(7) Laya2.0_示例(7) Laya3.0_文档(6) laya_api(1) Laya3.0_api(1) Laya2.0_api(1)
... //设置旋转角度 this.tmpVector.setValue(Math.random() * 360, Math.random() * 360, Math.random() * 360); box.transform.rotationEuler = this.tmpVector; //设置掉落位置 this.tmpVector.setValue(-2, 2, -2); box.transform.p...
来源: Laya_社区 发布时间: 20201127
...food.graphics.drawRect(0, 0, foodSize, foodSize, "#00BFFF"); food.x = Math.random() * Laya.stage.width; food.y = Math.random() * Laya.stage.height; } })()module laya { import Sprite = Laya.Sprite; import AccelerationInfo = Laya.AccelerationInfo; import Accelerator = Laya.Accelerator; import Point = ...
来源: Laya_示例 发布时间: 20251130
... //随机获取震动方向 dir = Math.random() > .5 ? 1 : -1; //随机获取X轴移动量 offX = Math.random() * 5 * dir + vibrateObj.x; //随机获取Y轴移动量 offY = Math....
来源: Laya_社区 发布时间: 20190401
...food.graphics.drawRect(0, 0, foodSize, foodSize, "#00BFFF"); food.x = Math.random() * Laya.stage.width; food.y = Math.random() * Laya.stage.height; } } class Segment extends Laya.Sprite { constructor(width, height) { super(); this.size(width, height); this.init(); } init() { this.graphics.drawRect(-...
来源: Laya2.0_示例 发布时间: 20251130
...ntLight.addComponent(Laya.PointLightCom); pointLightCom.range = 2.0 + Math.random() * 8.0; pointLightCom.color.setValue(Math.random(), Math.random(), Math.random(), 1); pointLightCom.intensity = 6.0 + Math.random() * 8; moverLights[i] = pointLight; offsets[i] = new Vector3((Math.random() - 0.5) * 10...
来源: Laya3.0_文档 发布时间: 20251010
...MethodDefined By RandX(seed:Array) 创建一个 Rand 实例。 RandX random():Number 返回[0,1)之间的随机数。 RandX randomint():Array 通过2x32位的数组,返回64位的随机数。 RandXProperty DetaildefaultRandpropertypublic static var defaultRand:RandX基于时间种子的...
来源: laya_api 发布时间: 20170929
...MethodDefined By RandX(seed:Array) 创建一个 Rand 实例。 RandX random():Number 返回[0,1)之间的随机数。 RandX randomint():Array 通过2x32位的数组,返回64位的随机数。 RandXProperty DetaildefaultRandpropertypublic static var defaultRand:RandX基于时间种子的...
来源: Laya2.0_api 发布时间: 20190513
...form.localPosition = new Laya.Vector3(this.startPos.x + (4.5 - Math.random() * 9), this.startPos.y, this.startPos.z + (2.5 - Math.random() * 5)); console.log('----------------goldnode', goldNode); this.playerGoldArr.pu...
来源: Laya_社区 发布时间: 20200326
...tartColor=MathUtil.lerp(settings.minStartColor,settings.maxStartColor,Math.random()); particleData.endColor=MathUtil.lerp(settings.minEndColor,settings.maxEndColor,Math.random()); } 改为 if (settings.disableColor){ for (i=0;i < 3;i++){ particleData.startColor=1; particleData.endColor=1; } parti...
来源: Laya_社区 发布时间: 20170416
...hootBall); } public shootBall(): void{ //生成空中降落的球 //var random: number = Math.random()*24-7; let ball: Laya.MeshSprite3D = new Laya.MeshSprite3D(Laya.PrimitiveMesh.createSphere(1)); this.scene1.addChild(ball); ball.transform.position = new Laya.Vector3((Math.random() - 0.5) * 2...
来源: Laya_社区 发布时间: 20190506