Esempio n. 1
0
        internal void BeginCutsceneFromNetwork_Internal(
            SceneID sceneId,
            CutsceneStartProtocol netData,
            Action <string> onSuccess,
            Action <string> onFail)
        {
            this.CurrentScene = this.CreateIntroSceneFromNetwork(netData);

            if (this.CurrentScene != null)
            {
                this.CurrentScene.BeginScene_Internal(this);
                onSuccess("Success.");
                return;
            }

            int retries = 0;

            Timers.SetTimer(2, true, () => {
                this.CurrentScene = this.CreateIntroSceneFromNetwork(netData);

                if (this.CurrentScene == null)
                {
                    if (retries++ < 1000)
                    {
                        return(true);
                    }
                    else
                    {
                        onFail("Timed out.");
                        return(false);
                    }
                }

                this.CurrentScene.BeginScene_Internal(this);

                onSuccess("Success.");
                return(false);
            });
        }
Esempio n. 2
0
        ////////////////

        internal void BeginCutscene_Internal()
        {
            this.CurrentScene = this.CreateIntroScene();
            this.CurrentScene.BeginScene_Internal(this);
        }
Esempio n. 3
0
        ////////////////

        public SceneID(Mod mod, SceneBase instance) : this(mod, instance.GetType())
        {
        }