Exemplo n.º 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);
     }
 }
Exemplo n.º 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;
        }
Exemplo n.º 3
0
 public void Init()
 {
     _procedure = null;
 }