mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 23:11:54 +08:00
9e396eef3d
- Updated various feed components (Cake, Cupcake, Dango, Donut, FruitPlatter, FruitSalad, Milk, Orange, RedJam, Strawberry, Taco, WaterBottle, Xigua-Full, Xigua-Half, YellowJam) to correct names, textures, and display names. - Modified MakeFeed scene to improve feed selection and display logic, including the addition of skip functionality. - Enhanced UIState and EntityBase scripts to manage feed counts and selections more effectively. - Introduced DirTool for directory operations and improved file loading mechanisms. - Adjusted TickTool for frame-based operations.
17 lines
391 B
GDScript
17 lines
391 B
GDScript
class_name DirTool
|
|
|
|
static func listdir(path: String) -> Array[String]:
|
|
var files: Array[String] = []
|
|
var dir = DirAccess.open(path)
|
|
if dir:
|
|
dir.list_dir_begin()
|
|
var file_name = dir.get_next()
|
|
while file_name != "":
|
|
if file_name != "." and file_name != "..":
|
|
files.append(path + file_name)
|
|
file_name = dir.get_next()
|
|
dir.list_dir_end()
|
|
return files
|
|
else:
|
|
return []
|