|
@@ -233,6 +233,7 @@ void AudioStreamPlayer2D::_notification(int p_what) {
|
|
//stop playing if no longer active
|
|
//stop playing if no longer active
|
|
if (!active) {
|
|
if (!active) {
|
|
set_physics_process_internal(false);
|
|
set_physics_process_internal(false);
|
|
|
|
+ //do not update, this makes it easier to animate (will shut off otherwise)
|
|
//_change_notify("playing"); //update property in editor
|
|
//_change_notify("playing"); //update property in editor
|
|
emit_signal("finished");
|
|
emit_signal("finished");
|
|
}
|
|
}
|
|
@@ -312,11 +313,6 @@ void AudioStreamPlayer2D::stop() {
|
|
|
|
|
|
bool AudioStreamPlayer2D::is_playing() const {
|
|
bool AudioStreamPlayer2D::is_playing() const {
|
|
|
|
|
|
-#ifdef TOOLS_ENABLED
|
|
|
|
- if (Engine::get_singleton()->is_editor_hint())
|
|
|
|
- return fake_active;
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
if (stream_playback.is_valid()) {
|
|
if (stream_playback.is_valid()) {
|
|
return active; // && stream_playback->is_playing();
|
|
return active; // && stream_playback->is_playing();
|
|
}
|
|
}
|
|
@@ -361,16 +357,11 @@ bool AudioStreamPlayer2D::is_autoplay_enabled() {
|
|
|
|
|
|
void AudioStreamPlayer2D::_set_playing(bool p_enable) {
|
|
void AudioStreamPlayer2D::_set_playing(bool p_enable) {
|
|
|
|
|
|
-#ifdef TOOLS_ENABLED
|
|
|
|
- fake_active = p_enable;
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
if (p_enable)
|
|
if (p_enable)
|
|
play();
|
|
play();
|
|
else
|
|
else
|
|
stop();
|
|
stop();
|
|
}
|
|
}
|
|
-
|
|
|
|
bool AudioStreamPlayer2D::_is_active() const {
|
|
bool AudioStreamPlayer2D::_is_active() const {
|
|
|
|
|
|
return active;
|
|
return active;
|