-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.cs.old
More file actions
40 lines (31 loc) · 1.15 KB
/
Test.cs.old
File metadata and controls
40 lines (31 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using Godot;
using System;
using gdsFM;
// using System.Collections.Generic;
public class Test : Label
{
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
// await ToSignal(GetTree(), "idle_frame");
// var osc = GetNode<Line2D>("Osc");
// osc.Points = new Vector2[4096];
// for(int i=0; i<4096; i++)
// {
// q.Enqueue(0);
// osc.Points[i].x = i / 8;
// osc.Points[i].y = i;
// }
// osc.Points = new Vector2[4096];
}
// // Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(float delta)
{
this.Text = Engine.GetIdleFrames().ToString() + ":= " + Oscillator.Sine(Engine.GetIdleFrames(), 1).ToString();
// this.Text = Engine.GetIdleFrames().ToString() + ": " + Tables.sin[Engine.GetIdleFrames() & Tables.SINE_TABLE_MASK].ToString();
// var osc = GetNode<Line2D>("Osc");
// var i = Engine.GetIdleFrames() % 4096;
// short y = Oscillator.Sine(Engine.GetIdleFrames(), 0);
// osc.Points[i].y = y / 4096.0f;
}
}