File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,24 @@ implementing a Timer-timeout loop is another option.
8484 print("This block runs every 0.5 seconds")
8585 )
8686
87+ .. code-tab :: csharp
88+
89+ using Godot;
90+
91+ public partial class MyNode : Node
92+ {
93+ // Allows for recurring operations that don't trigger script logic
94+ // every frame (or even every fixed frame).
95+ public override void _Ready()
96+ {
97+ var timer = new Timer();
98+ timer.Autostart = true;
99+ timer.WaitTime = 0.5;
100+ AddChild(timer);
101+ timer.Timeout += () => GD.Print("This block runs every 0.5 seconds");
102+ }
103+ }
104+
87105Use ``_physics_process() `` when one needs a framerate-independent delta time
88106between frames. If code needs consistent updates over time, regardless
89107of how fast or slow time advances, this is the right place.
You can’t perform that action at this time.
0 commit comments