Godot 4.3
读取文件
1 | FileAccess.open(文件路径,FileAccess.READ).get_as_text() |
创建文件夹
1 | DirAccess.open(父文件夹路径).make_dir(子文件夹名) |
运行后会在 /storage/emulated/0/
下创建一个名为 新建文件夹
的文件夹
得到 /storage/emulated/0/新建文件夹/
Godot 4.3
1 | FileAccess.open(文件路径,FileAccess.READ).get_as_text() |
1 | DirAccess.open(父文件夹路径).make_dir(子文件夹名) |
运行后会在 /storage/emulated/0/
下创建一个名为 新建文件夹
的文件夹
得到 /storage/emulated/0/新建文件夹/
1 | function getClientIp() { |
1 | var vector:Vector2 = Vector2(0,0) # 定义需要设置的坐标(x,y) |
如果 source_id
为 -1
、atlas_coords
为 Vector2i(-1, -1)
或 alternative_tile
为 -1
,则会擦除该单元格。擦除后的单元格中,所有标识符都会自动设为对应的无效值,即 -1
、Vector2i(-1, -1)
和 -1
1 | var vector:Vector2 = Vector2(0,0) # 定义需要设置的坐标(x,y) |
TextureButton
子节点TextureButton
充满整个节点TextureButton
添加点击事件即可1 | func onClick(): |
1 | public static float dp2px(float dp) { |
1 | public static float px2dp(Context context,float px) { |