Exemplo n.º 1
0
    void Awake()
    {
        Debug.Log("---------------  Awake ------------------------");

        //common facades
        foreach (UIFacade facade in uIFacades)
        {
            facade.Register();
        }

        //custom facades
        UIFacade[] facades = this.transform.Find("UIFacades").GetComponentsInChildren <UIFacade>();
        foreach (UIFacade facade in facades)
        {
            facade.Register();
        }

        initialize();

        // window tools
        WindowToolsView viewWindowTools = new WindowToolsView();

        framework.viewCenter.Register(WindowToolsView.NAME, viewWindowTools);

        // quit dialog
        QuitDialogView viewQuitDialog = new QuitDialogView();

        framework.viewCenter.Register(QuitDialogView.NAME, viewQuitDialog);

        // bootloader
        BootloaderView viewBootloader = new BootloaderView();

        framework.viewCenter.Register(BootloaderView.NAME, viewBootloader);
        controllerBootloader = new BootloaderBatchController();
        framework.controllerCenter.Register(BootloaderBatchController.NAME, controllerBootloader);
        modelBootloader = new BootloaderModel();
        framework.modelCenter.Register(BootloaderModel.NAME, modelBootloader);

        // account
        serviceAccount = new AccountService();
        modelAccount   = new AccountModel();
        AccountController  controllerAccount  = new AccountController();
        AccountProfileView viewAccountProfile = new AccountProfileView();

        framework.modelCenter.Register(AccountModel.NAME, modelAccount);
        framework.viewCenter.Register(AccountProfileView.NAME, viewAccountProfile);
        framework.controllerCenter.Register(AccountController.NAME, controllerAccount);
        framework.serviceCenter.Register(AccountService.NAME, serviceAccount);
        serviceAccount.domain        = Constant.Domain;
        serviceAccount.MockProcessor = AccountMock.Processor;
        serviceAccount.useMock       = DataCache.offline;

        LobbyNavigationView viewNavigation = new LobbyNavigationView();

        framework.viewCenter.Register(LobbyNavigationView.NAME, viewNavigation);
    }
Exemplo n.º 2
0
    void Awake()
    {
        Debug.Log("---------------  Awake ------------------------");

        Physics.gravity = Vector3.zero;
        //common facades
        foreach (UIFacade facade in uIFacades)
        {
            facade.Register();
        }

        //custom facades
        UIFacade[] facades = this.transform.Find("UIFacades").GetComponentsInChildren <UIFacade>();
        foreach (UIFacade facade in facades)
        {
            facade.Register();
        }

        initialize();

        // window tools
        WindowToolsView viewWindowTools = new WindowToolsView();

        framework.viewCenter.Register(WindowToolsView.NAME, viewWindowTools);

        // quit dialog
        QuitDialogView viewQuitDialog = new QuitDialogView();

        framework.viewCenter.Register(QuitDialogView.NAME, viewQuitDialog);

        // bootloader
        BootloaderView viewBootloader = new BootloaderView();

        framework.viewCenter.Register(BootloaderView.NAME, viewBootloader);
        controllerBootloader = new BootloaderBatchController();
        framework.controllerCenter.Register(BootloaderBatchController.NAME, controllerBootloader);
        modelBootloader = new BootloaderModel();
        framework.modelCenter.Register(BootloaderModel.NAME, modelBootloader);

        // navigation
        RoomNavigationView viewNavigation = new RoomNavigationView();

        framework.viewCenter.Register(RoomNavigationView.NAME, viewNavigation);
    }
Exemplo n.º 3
0
    void Awake()
    {
        Debug.Log("---------------  Awake ------------------------");

        proxyLua = new LuaProxy();
        proxyLua.AddSearchPath(Application.persistentDataPath);
        string lua = proxyLua.ReadFile(System.IO.Path.Combine(Application.streamingAssetsPath, "root.lua"));

        proxyLua.UseRootCode(lua);

        proxyXR.DoAwake();

        GameObject objMT = new GameObject("_MT_");

        runtimetMT      = objMT.AddComponent <RuntimeMT>();
        runtimetMT.mvcs = this;

        foreach (Transform child in this.transform.Find("UIFacades"))
        {
            UIFacade facade = child.GetComponent <UIFacade>();
            facade.Register();
        }

        initialize();

        // bootloader
        BootloaderView viewBootloader = new BootloaderView();

        framework.viewCenter.Register(BootloaderView.NAME, viewBootloader);
        controllerBootloader          = new BootloaderBatchController();
        controllerBootloader.onFinish = runRom;
        framework.controllerCenter.Register(BootloaderBatchController.NAME, controllerBootloader);
        modelBootloader = new BootloaderModel();
        framework.modelCenter.Register(BootloaderModel.NAME, modelBootloader);

        proxyLua.DoAwake();
    }