예제 #1
0
 public void Register(string name, IProcedure proc)
 {
     if (!_procedures.ContainsKey(name))
     {
         proc.procName     = name;
         proc.procSceneRes = name;
         _procedures.Add(name, proc);
     }
     else
     {
         GameLog.Warn("register same procedure, name({0})", name);
     }
 }
예제 #2
0
        public void ChangeProcedure(string name, int sceneId = 0)
        {
            IProcedure procedure = GameContext.procedureFactory.Get(name);

            if (procedure == null)
            {
                GameLog.Error("change procedure type error.name({0})", name);
                return;
            }

            procedure.Reset();
            procedure.sceneId = sceneId;
            SceneManager.LoadScene(procedure.procSceneRes);
            _procedure = procedure;
        }
예제 #3
0
 public void Init()
 {
     _procedure = null;
 }