diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-11-05 21:20:42 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-11-05 21:20:42 -0300 |
commit | 0dbedd18fc62f700e92a4cf581e505d849bc47ad (patch) | |
tree | 8f2c85b4d9227e441fd35ab4873009faa656bcba /scene/audio | |
parent | d14baf6e41bcdbe4968e0513beccc09dfb160ecd (diff) |
SceneMainLoop -> SceneTree
-=-=-=-=-=-=-=-=-=-=-=-=-=-
*YOUR SOURCE MIGHT NOT WORK*
For mor information on fix:
https://github.com/okamstudio/godot/wiki/devel_scene_tree
Other stuff:
-Shower of bullets demo
-Fixes all around
Diffstat (limited to 'scene/audio')
-rw-r--r-- | scene/audio/event_player.cpp | 12 | ||||
-rw-r--r-- | scene/audio/sound_room_params.cpp | 4 | ||||
-rw-r--r-- | scene/audio/stream_player.cpp | 12 |
3 files changed, 14 insertions, 14 deletions
diff --git a/scene/audio/event_player.cpp b/scene/audio/event_player.cpp index e5b2be53ca..dc46f4711c 100644 --- a/scene/audio/event_player.cpp +++ b/scene/audio/event_player.cpp @@ -33,13 +33,13 @@ void EventPlayer::_notification(int p_what) { switch(p_what) { - case NOTIFICATION_ENTER_SCENE: { + case NOTIFICATION_ENTER_TREE: { //set_idle_process(false); //don't annoy - if (playback.is_valid() && autoplay && !get_scene()->is_editor_hint()) + if (playback.is_valid() && autoplay && !get_tree()->is_editor_hint()) play(); } break; - case NOTIFICATION_EXIT_SCENE: { + case NOTIFICATION_EXIT_TREE: { stop(); //wathever it may be doing, stop } break; @@ -75,7 +75,7 @@ Ref<EventStream> EventPlayer::get_stream() const { void EventPlayer::play() { - ERR_FAIL_COND(!is_inside_scene()); + ERR_FAIL_COND(!is_inside_tree()); if (playback.is_null()) { return; } @@ -93,7 +93,7 @@ void EventPlayer::play() { void EventPlayer::stop() { - if (!is_inside_scene()) + if (!is_inside_tree()) return; if (playback.is_null()) return; @@ -241,7 +241,7 @@ bool EventPlayer::is_paused() const { void EventPlayer::_set_play(bool p_play) { _play=p_play; - if (is_inside_scene()) { + if (is_inside_tree()) { if(_play) play(); else diff --git a/scene/audio/sound_room_params.cpp b/scene/audio/sound_room_params.cpp index 3e0a64b3f1..01d373ebff 100644 --- a/scene/audio/sound_room_params.cpp +++ b/scene/audio/sound_room_params.cpp @@ -53,7 +53,7 @@ void SoundRoomParams::_notification(int p_what) { switch(p_what) { - case NOTIFICATION_ENTER_SCENE: { + case NOTIFICATION_ENTER_TREE: { #if 0 Node *n=this; Room *room_instance=NULL; @@ -81,7 +81,7 @@ void SoundRoomParams::_notification(int p_what) { #endif } break; - case NOTIFICATION_EXIT_SCENE: { + case NOTIFICATION_EXIT_TREE: { room=RID(); diff --git a/scene/audio/stream_player.cpp b/scene/audio/stream_player.cpp index 5084c1295b..73025fb52c 100644 --- a/scene/audio/stream_player.cpp +++ b/scene/audio/stream_player.cpp @@ -33,13 +33,13 @@ void StreamPlayer::_notification(int p_what) { switch(p_what) { - case NOTIFICATION_ENTER_SCENE: { + case NOTIFICATION_ENTER_TREE: { //set_idle_process(false); //don't annoy - if (stream.is_valid() && autoplay && !get_scene()->is_editor_hint()) + if (stream.is_valid() && autoplay && !get_tree()->is_editor_hint()) play(); } break; - case NOTIFICATION_EXIT_SCENE: { + case NOTIFICATION_EXIT_TREE: { stop(); //wathever it may be doing, stop } break; @@ -75,7 +75,7 @@ Ref<AudioStream> StreamPlayer::get_stream() const { void StreamPlayer::play() { - ERR_FAIL_COND(!is_inside_scene()); + ERR_FAIL_COND(!is_inside_tree()); if (stream.is_null()) return; if (stream->is_playing()) @@ -91,7 +91,7 @@ void StreamPlayer::play() { void StreamPlayer::stop() { - if (!is_inside_scene()) + if (!is_inside_tree()) return; if (stream.is_null()) return; @@ -214,7 +214,7 @@ bool StreamPlayer::is_paused() const { void StreamPlayer::_set_play(bool p_play) { _play=p_play; - if (is_inside_scene()) { + if (is_inside_tree()) { if(_play) play(); else |