SetDeferred

在下一帧时设置属性

CS
@GodotObject.SetDeferred("属性名称", Value);
点击展开查看更多

AreaOnBodyEntered函数中设置monitoring需要SetDeferred

CallDeferred

在下一帧执行指定函数

CS
@GodotObject.CallDeferred("函数名称", params Variant[] args);
点击展开查看更多

原地等待一帧

CS
await ToSignal(GetTree(), SceneTree.SignalName.ProcessFrame);
点击展开查看更多

版权声明

作者: Chaim

链接: https://chaim.eu.org/posts/%E4%B8%8B%E4%B8%80%E5%B8%A7%E6%89%A7%E8%A1%8C/

许可证: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Please attribute the source, use non-commercially, and maintain the same license.

开始搜索

输入关键词搜索文章内容

↑↓
ESC
⌘K 快捷键