@@ -263,6 +263,17 @@ int main()
263
263
}
264
264
```
265
265
266
+ ##### Godot
267
+
268
+ ``` gdscript
269
+ extends Node
270
+
271
+ func _ready() -> void:
272
+ var value = rhythm_game_utilities.inverse_lerp(0, 10, 5)
273
+
274
+ print(value) # 0.5
275
+ ```
276
+
266
277
#### ` Common.Lerp `
267
278
268
279
> Languages: ` C# ` ` C++ `
@@ -297,6 +308,17 @@ int main()
297
308
}
298
309
```
299
310
311
+ ##### Godot
312
+
313
+ ``` gdscript
314
+ extends Node
315
+
316
+ func _ready() -> void:
317
+ var value = rhythm_game_utilities.lerp(0, 10, 0.5)
318
+
319
+ print(value) # 5
320
+ ```
321
+
300
322
### ` Parsers `
301
323
302
324
Read more about ` .chart ` files: < https://github.com/TheNathannator/GuitarGame_ChartFormats/blob/main/doc/FileFormats/.chart/Core%20Infrastructure.md >
@@ -724,6 +746,26 @@ int main()
724
746
}
725
747
```
726
748
749
+ ##### Godot
750
+
751
+ ``` gdscript
752
+ extends Node
753
+
754
+ func _ready() -> void:
755
+ var seconds = 5;
756
+ var resolution = 192;
757
+
758
+ var bpmChanges = {
759
+ 0: 88000, 3840: 112000, 9984: 89600,
760
+ 22272: 112000, 33792: 111500, 34560: 112000,
761
+ 42240: 111980
762
+ }
763
+
764
+ var ticks = rhythm_game_utilities.convert_seconds_to_ticks(seconds, resolution, bpmChanges);
765
+
766
+ print(ticks) # 1408
767
+ ```
768
+
727
769
#### ` Utilities.ConvertTickToPosition `
728
770
729
771
> Languages: ` C# ` ` C++ `
@@ -764,6 +806,20 @@ int main()
764
806
}
765
807
```
766
808
809
+ ##### Godot
810
+
811
+ ``` gdscript
812
+ extends Node
813
+
814
+ func _ready() -> void:
815
+ var tick = 2784;
816
+ var resolution = 192;
817
+
818
+ var position = rhythm_game_utilities.convert_tick_to_position(tick, resolution);
819
+
820
+ print(position) # 14.5
821
+ ```
822
+
767
823
#### ` Utilities.IsOnTheBeat `
768
824
769
825
> Languages: ` C# ` ` C++ `
@@ -808,6 +864,20 @@ int main()
808
864
}
809
865
```
810
866
867
+ ##### Godot
868
+
869
+ ``` gdscript
870
+ extends Node
871
+
872
+ func _ready() -> void:
873
+ var bpm = 120;
874
+ var currentTime = 10;
875
+ var delta = 0.05;
876
+
877
+ if rhythm_game_utilities.is_on_the_beat(bpm, currentTime, delta):
878
+ print("Is on the beat!")
879
+ ```
880
+
811
881
#### ` Utilities.RoundUpToTheNearestMultiplier `
812
882
813
883
> Languages: ` C# ` ` C++ `
@@ -842,6 +912,17 @@ int main()
842
912
}
843
913
```
844
914
915
+ ##### Godot
916
+
917
+ ``` gdscript
918
+ extends Node
919
+
920
+ func _ready() -> void:
921
+ var value = rhythm_game_utilities.round_up_to_the_nearest_multiplier(12, 10);
922
+
923
+ print(value) # 20
924
+ ```
925
+
845
926
## Architecture
846
927
847
928
The current architecture for this project looks like this:
0 commit comments