コード例 #1
0
    public void beforeTransitionIn(States.State state)
    {
        SceneBaseClass scene = SceneLoader.Instance.GetScene(state);

        if (scene != null)
        {
            scene.BeforeTransitionIn();
        }
    }
コード例 #2
0
 private void stateAgain(States.State state)
 {
     if (SceneLoader.Instance.GetScene(state) != null)
     {
         SceneBaseClass sb = SceneLoader.Instance.GetScene(state);
         if (sb)
         {
             sb.TappedAgain();
         }
     }
 }
コード例 #3
0
    public void LoadScene(States.State name)
    {
        RKLog.Log("load scene " + name, "sceneloader");
        if (scenes[name].loading == false && scenes[name].loaded == false)
        {
            // Debug.LogError(scenes[name].name);
            scenes[name].loading = true;
            GameObject g = HelperFunctions.GetPrefab2d(scenes[name].name, scenes[name].target);

            if (g == null)
            {
                Debug.LogError("NO GAMEOBJECT LOADED " + name);
                return;
            }

            SceneBaseClass sb = g.GetComponent <SceneBaseClass>();

            if (sb == null)
            {
                Debug.LogError("NO SCENEBASECLASS LOADED " + name);
                return;
            }



            scenes[name].gameobject = g;
            scenes[name].Scene      = sb;


            scenes[name].loaded  = true;
            scenes[name].load    = false;
            scenes[name].loading = false;

            bool issceneloaded = false;

            sceneloaded.Invoke(name);

            CheckLoadedAll();
        }
        else if (scenes[name].loaded)
        {
            Debug.LogError("Scene " + name + " already loaded");
        }
    }
コード例 #4
0
    private void completeAnimation()
    {
        SceneAnimatorObject animation = null;

        if (animations.Count > 0)
        {
            animation = animations[0];
        }
        //Debug.LogError("complete animation ");
        if (animation != null && animation.outScene != null)
        {
            SceneBaseClass scene = SceneLoader.Instance.GetScene(animation.outScene.State);

            if (scene != null)
            {
                scene.AfterTransitionOut();
            }
            SceneLoader.Instance.Hide(animation.outScene.State);
        }
        if (animation != null && animation.inScene != null)
        {
            SceneBaseClass scene = SceneLoader.Instance.GetScene(animation.inScene.State);
            if (scene != null)
            {
                scene.AfterTransitionIn();
            }
        }
        if (animations.Count > 0)
        {
            animations.RemoveAt(0);
        }
        _animating = false;
        GlobalController.StateManager.Unlock();
        animate();
        //Debug.LogError("complete animation end");
        complete.Invoke();
    }