Adaptive music and music 👍
This commit is contained in:
parent
a8ae482cbe
commit
dcffb97a3d
48 changed files with 603 additions and 24 deletions
12
scripts/ScalableAudioPlayer.cs
Normal file
12
scripts/ScalableAudioPlayer.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class ScalableAudioPlayer : AudioStreamPlayer
|
||||
{
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if(PitchScale != (float)Engine.TimeScale)
|
||||
PitchScale = (float)Engine.TimeScale * (float)Engine.TimeScale;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue