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
This commit is contained in:
Juan Linietsky
2014-11-05 21:20:42 -03:00
parent d14baf6e41
commit 0dbedd18fc
168 changed files with 1534 additions and 1310 deletions

View File

@ -189,7 +189,7 @@ void AnimationPlayer::_notification(int p_what) {
switch(p_what) {
case NOTIFICATION_ENTER_SCENE: {
case NOTIFICATION_ENTER_TREE: {
if (!processing) {
//make sure that a previous process state was not saved
@ -202,7 +202,7 @@ void AnimationPlayer::_notification(int p_what) {
} break;
case NOTIFICATION_READY: {
if (!get_scene()->is_editor_hint() && animation_set.has(autoplay)) {
if (!get_tree()->is_editor_hint() && animation_set.has(autoplay)) {
play(autoplay);
}
} break;
@ -221,7 +221,7 @@ void AnimationPlayer::_notification(int p_what) {
if (processing)
_animation_process( get_fixed_process_delta_time() );
} break;
case NOTIFICATION_EXIT_SCENE: {
case NOTIFICATION_EXIT_TREE: {
stop_all();
clear_caches();
@ -261,8 +261,8 @@ void AnimationPlayer::_generate_node_caches(AnimationData* p_anim) {
}
{
if (!child->is_connected("exit_scene",this,"_node_removed"))
child->connect("exit_scene",this,"_node_removed",make_binds(child),CONNECT_ONESHOT);
if (!child->is_connected("exit_tree",this,"_node_removed"))
child->connect("exit_tree",this,"_node_removed",make_binds(child),CONNECT_ONESHOT);
}
TrackNodeCacheKey key;
@ -348,7 +348,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData* p_anim,float p
Animation *a=p_anim->animation.operator->();
bool can_call = is_inside_scene() && !get_scene()->is_editor_hint();
bool can_call = is_inside_tree() && !get_tree()->is_editor_hint();
for (int i=0;i<a->get_track_count();i++) {
@ -922,7 +922,7 @@ void AnimationPlayer::play(const StringName& p_name, float p_custom_blend, float
_set_process(true); // always process when starting an animation
playing = true;
if (is_inside_scene() && get_scene()->is_editor_hint())
if (is_inside_tree() && get_tree()->is_editor_hint())
return; // no next in this case