大约有 81 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0046 秒)
Laya_社区(55) Laya2.0_文档(8) Laya3.0_文档(6) Laya_示例(5) Laya2.0_示例(4) laya_api(1) Laya3.0_api(1) Laya2.0_api(1)
... //随机获取震动方向 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
...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
...ype === "enemy3"){ // 随机是子弹道具还是医疗包 var type = Math.random() < 0.7 ? 2 : 3; var item = Laya.Pool.getItemByClass("role",Role); // 初始化信息 item.init("ufo" + (type - 1),role.camp,1,1,15,type); // 设置位置 item.pos(role.x,role.y); // 添加到舞台上 Laya.stage.ad...
来源: Laya_社区 发布时间: 20170525
...r() { sp.graphics.clear(); var rc:number = Math.floor(Math.random()*0xffffff); sp.graphics.drawRect(-50,-100,100,100,"#"+rc); } 这样多包几层,点击区域就会怪怪的,绘制的区域和点击区域不一样,不知道是不是我理解的有问题 2018-01-06 添...
来源: Laya_社区 发布时间: 20180106
...ype === "enemy3"){ // 随机是子弹道具还是医疗包 var type = Math.random() < 0.7 ? 2 : 3; var item = Laya.Pool.getItemByClass("role",Role); // 初始化信息 item.init("ufo" + (type - 1),role.camp,1,1,15,type); // 设置位置 item.pos(role.x,role.y); // 添加到舞台上 Laya.stage.ad...
来源: Laya_社区 发布时间: 20170525