mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
refactor(MathTool): 重命名随机数相关方法以提高可读性
将 randv2_range 重命名为 randomVector2In,randc_from 重命名为 randomChoiceFrom,randc_from_weights 重命名为 randChoiceWeightsFrom,并新增 randomRingPoint 方法
This commit is contained in:
@@ -13,7 +13,7 @@ func _ready():
|
||||
func _physics_process(_delta):
|
||||
if is_instance_valid(UIState.player):
|
||||
position = UIState.player.position
|
||||
position += MathTool.randv2_range(shakeIntensity)
|
||||
position += MathTool.randomVector2In(shakeIntensity)
|
||||
|
||||
static func shake(millseconds: float, intensity: float = 10, steper: Callable = func(currentValue, _totalValue, _restPercent): return currentValue):
|
||||
var startTime = WorldManager.getTime()
|
||||
|
||||
Reference in New Issue
Block a user