Пример #1
0
    void Awake()
    {
        if (activeGame != null)
        {
            DestroyImmediate(this);
        }
        else
        {
            activeGame = this;
        }

        InitAllModel();
        Refresh();

        // 设置运行形后第一个进入的流程
        System.Type type = System.Type.GetType(TypeName);
        if (type != null)
        {
            ProcedureModule.ChangeProcedure(type);

            ProcedureBase procedure = ProcedureModule.GetCurrentProcedure();
            DeSerialize(procedure);
        }
        else
        {
            Debug.LogError("当前工程还没有任何流程");
        }

        DontDestroyOnLoad(this);
    }
Пример #2
0
    void Awake()
    {
        if (GameObject.FindObjectsOfType <Game>().Length > 1)
        {
            DestroyImmediate(this);
            return;
        }

        InitAllModel();
        Refresh();

        // 设置运行形后第一个进入的流程
        System.Type type = System.Type.GetType(TypeName);
        if (type != null)
        {
            ProcedureModule.StartProcedure(type);

            ProcedureBase procedure = ProcedureModule.GetCurrentProcedure();
            DeSerialize(procedure);
        }
        else
        {
            Debug.LogError("当前工程还没有任何流程");
        }

        DontDestroyOnLoad(this);
    }
Пример #3
0
    void Awake()
    {
        InitModel();
        InitCustomModule();

        ProcedureModule.StartProcedure(System.Type.GetType(TypeName));

        DontDestroyOnLoad(this);
    }