ARTICLE DETAIL

资讯详情

深耕郑州网站建设与运营推广的一线实战洞察。

Godot2D平面游戏角色闲逛

Godot2D平面游戏角色闲逛 func _physics_process(delta: float) - void: velocity Vector2i(move_direction * Speed) func randomize_wander(): #闲逛 move_direction Vector2(0,0) move_direction Vector2(randf_range(-1, 1), randf_range(-1, 1).normalized() wander_time randf_range(5, 10) #一次闲逛持续时间
返回列表