mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-22 03:22:30 +08:00
refactor(MathTool): 重命名随机数相关方法以提高可读性
将 randv2_range 重命名为 randomVector2In,randc_from 重命名为 randomChoiceFrom,randc_from_weights 重命名为 randChoiceWeightsFrom,并新增 randomRingPoint 方法
This commit is contained in:
@@ -88,7 +88,7 @@ static func spawn(center: Vector2) -> Array:
|
||||
var wave: Wave = data[i]
|
||||
for j in range(entityCountOf(wave)):
|
||||
var currentWave = wave.duplicate()
|
||||
currentWave.entityPosition = MathTool.randv2_range(500) + center
|
||||
currentWave.entityPosition = MathTool.randomRingPoint(200, 1000) + center
|
||||
result.append(currentWave)
|
||||
return result
|
||||
static func next(waves: Array):
|
||||
|
||||
Reference in New Issue
Block a user