Ejemplo n.º 1
0
        public override bool Update()
        {
            bool result = true;

            switch (this.step)
            {
            case InitializeState.Step.INIT:
                this.Initialize();
                this.step = InitializeState.Step.INIT_WAIT;
                break;

            case InitializeState.Step.INIT_WAIT:
                if (this.isFinishInitialize)
                {
                    this.step = InitializeState.Step.RUN;
                }
                break;

            case InitializeState.Step.RUN:
                ClassSingleton <AdventureSceneData> .Instance.adventureScriptEngine.RunScript();

                if (ClassSingleton <AdventureSceneData> .Instance.adventureScriptEngine.GetState() != AdventureScriptEngine.ScriptState.INIT)
                {
                    this.step = InitializeState.Step.END;
                }
                break;

            case InitializeState.Step.END:
                this.resultCode = ResultCode.SUCCESS;
                result          = false;
                break;

            default:
                this.resultCode = ResultCode.ERROR;
                break;
            }
            return(result);
        }
Ejemplo n.º 2
0
 public InitializeState(Transform parent)
 {
     this.step               = InitializeState.Step.INIT;
     this.parentTransform    = parent;
     this.isFinishInitialize = false;
 }