remplissage, menu, gamin audio et autre
This commit is contained in:
18
scene/AudioStreamPlayer2d.cs
Normal file
18
scene/AudioStreamPlayer2d.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class AudioStreamPlayer2d : AudioStreamPlayer2D
|
||||
{
|
||||
|
||||
[Export] AudioStream audio;
|
||||
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (this.HasStreamPlayback() == false)
|
||||
{
|
||||
this.Stream = audio;
|
||||
Play();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user