Ejemplo n.º 1
0
        /** [シングルトン]constructor
         */
        private UniVrm()
        {
            //main_vrm
            this.main_vrm = new Main_Vrm();

            //work_list
            this.work_list = new System.Collections.Generic.List <WorkItem>();

            //add_list
            this.add_list = new System.Collections.Generic.List <WorkItem>();
        }
Ejemplo n.º 2
0
        /** [シングルトン]constructor
         */
        private UniVrm()
        {
            //main_vrm
            this.main_vrm = new Main_Vrm();

            //work_list
            this.work_list = new System.Collections.Generic.List <WorkItem>();

            //add_list
            this.add_list = new System.Collections.Generic.List <WorkItem>();

            //PlayerLoopType
            this.playerloop_flag = true;
            Fee.PlayerLoopSystem.PlayerLoopSystem.GetInstance().Add(Config.PLAYERLOOP_ADDTYPE, Config.PLAYERLOOP_TARGETTYPE, typeof(PlayerLoopType.Fee_UniVrm_Main), this.Main);
        }
Ejemplo n.º 3
0
        /** 更新。
         *
         *      return == true : 完了。
         *
         */
        public bool Main()
        {
            switch (this.mode)
            {
            case Mode.Start:
            {
                switch (this.request_type)
                {
                case RequestType.LoadVrm:
                {
                    if (Fee.UniVrm.UniVrm.GetInstance().GetMainVrm().RequestLoadVrm(this.request_binary) == true)
                    {
                        this.mode = Mode.Do;
                    }
                } break;
                }
            } break;

            case Mode.End:
            {
            } return(true);

            case Mode.Do:
            {
                Main_Vrm t_main = Fee.UniVrm.UniVrm.GetInstance().GetMainVrm();

                this.item.SetResultProgress(t_main.GetResultProgress());

                if (t_main.GetResultType() != Main_Vrm.ResultType.None)
                {
                    //結果。
                    bool t_success = false;
                    switch (t_main.GetResultType())
                    {
                    case Main_Vrm.ResultType.Context:
                    {
                        if (t_main.GetResultContext() != null)
                        {
                            this.item.SetResultContext(t_main.GetResultContext());
                            t_success = true;
                        }
                    } break;
                    }

                    if (t_success == false)
                    {
                        this.item.SetResultErrorString(t_main.GetResultErrorString());
                    }

                    //完了。
                    t_main.Fix();

                    this.mode = Mode.End;
                }
                else if (this.item.IsCancel() == true)
                {
                    //キャンセル。
                    t_main.Cancel();
                }
            } break;
            }

            return(false);
        }