Exemple #1
0
    // Use this for initialization
    void Start()
    {
        ProcedureManager procedureManager = FrameworkEntry.Instance.GetManager <ProcedureManager>();
        //Add Procedure Entrance
        Procedure_Start entranceProcedure = new Procedure_Start();

        procedureManager.AddProcedure(entranceProcedure);
        procedureManager.SetEntranceProcedure(entranceProcedure);
        //Add another Procedure
        procedureManager.AddProcedure(new Procedure_Play());
        procedureManager.AddProcedure(new Procedure_Over());

        procedureManager.CreateProceduresFsm();
    }
    void Awake()
    {
        ProcedureManager procedureManager = FrameworkEntry.Instance.GetManager <ProcedureManager>();

        //添加所有流程,并创建状态机
        Procedure_1st entranceProcedure = new Procedure_1st();

        procedureManager.AddProcedure(entranceProcedure);
        procedureManager.SetEntranceProcedure(entranceProcedure);

        procedureManager.AddProcedure(new Procedure_2nd());
        procedureManager.AddProcedure(new Procedure_3rd());

        procedureManager.CreateProceduresFsm();
    }
        // Start is called before the first frame update
        void Start()
        {
            ProcedureManager proceManager = FrameWorkEntiy.Instance.GetManager <ProcedureManager>();
            //添加入口流程
            Procedure_Start start = new Procedure_Start();

            proceManager.AddProcedure(start);
            proceManager.SetEntranceProcedure(start);

            //添加其他流程
            proceManager.AddProcedure(new Procedure_Play());
            proceManager.AddProcedure(new Procedure_Over());

            //创建流程状态机
            proceManager.CreateProceduresFsm();
        }