Beispiel #1
0
 public void Awake()
 {
     webView = WebViewManager.Inst.CreateWebView(1, 1);
     webView.LoadURL(BizSimScreen.GetStageItemURL(1));
     webView.LoadCompleted += OnLoadCompleted;
     serverDataDisplay      = gameObject.AddComponent <ServerDataDisplay>();
 }
Beispiel #2
0
 protected override void Awake()
 {
     base.Awake();
     stageItem = 200;
     bssId     = CollabBrowserId.CHARTS;
     url       = BizSimScreen.GetStageItemURL(stageItem);
 }
Beispiel #3
0
 protected override void Awake()
 {
     base.Awake();
     stageItem = 19;
     bssId     = CollabBrowserId.BANKINGCHARTS;
     url       = BizSimScreen.GetStageItemURL(stageItem);
     mInst     = this;
 }
Beispiel #4
0
 protected override void Awake()
 {
     base.Awake();
     disableScrolling = false;
     stageItem        = 300;
     bssId            = CollabBrowserId.ACCOUNTING;
     url = BizSimScreen.GetStageItemURL(stageItem);
 }
 protected override void Awake()
 {
     base.Awake();
     stageItem = 28;
     bssId     = CollabBrowserId.NEWPRODUCT;
     url       = BizSimScreen.GetStageItemURL(stageItem);
     allNewProdInvesters[bssId] = this;
 }
Beispiel #6
0
 protected override void Awake()
 {
     base.Awake();
     stageItem = 80;
     bssId     = CollabBrowserId.WAREHOUSE;
     url       = BizSimScreen.GetStageItemURL(stageItem);
     mInst     = this;
 }
Beispiel #7
0
 protected override void Awake()
 {
     base.Awake();
     stageItem = 5;
     bssId     = CollabBrowserId.NEWS;
     url       = BizSimScreen.GetStageItemURL(stageItem);
     url      += "&num_items=" + numItemsToDisplay;
     blacklistRequestURLFragments.Add("holdinginfo.php?playerid");
 }
Beispiel #8
0
 protected override void Awake()
 {
     base.Awake();
     stageItem = 6;
     bssId     = CollabBrowserId.SCORE;
     url       = BizSimScreen.GetStageItemURL(stageItem);
     blacklistRequestURLFragments.Add("holdinginfo.php?playerid");
     requestReplacements.Add(BaseURL + "/images/flags/us.gif", Directory.GetCurrentDirectory() + "/img/blank.gif");
 }
Beispiel #9
0
 protected override void Awake()
 {
     base.Awake();
     stageItem = 20;
     bssId     = CollabBrowserId.FINANCE;
     url       = BizSimScreen.GetStageItemURL(stageItem);
     refreshOnInvestmentBudgetChange = true;
     mInst = this;
 }
Beispiel #10
0
 protected override void Awake()
 {
     base.Awake();
     stageItem = 7;
     bssId     = CollabBrowserId.KPI;
     url       = BizSimScreen.GetStageItemURL(stageItem);
     url      += "&override_chartheight=" + chartHeight;
     mInst     = this;
 }
Beispiel #11
0
 protected override void Awake()
 {
     allProdMgrs[ServerID] = this;
     base.Awake();
     stageItem = 30;
     bssId     = CollabBrowserId.PRODUCTMGR + id;
     if (id < 0)
     {
         Debug.LogError("ProductManagementScreen: Please specify an id in the editor");
     }
     url = BizSimScreen.GetStageItemURL(stageItem);
 }
Beispiel #12
0
 public static string GetProductURL(string productTag)
 {
     return(BizSimScreen.GetStageItemURL(100) + "&ptag=" + productTag);
 }
Beispiel #13
0
    public void InitSim(string overrideSimType = "")
    {
        string companyName = "";

        switch (playMode)
        {
        case SimPlayMode.SINGLE_PLAYER:

            // until Industry Masters releases single player for more types of sims
            simType = (overrideSimType == "") ? "uimx_sustain" : overrideSimType;

            if (room != null && room.ContainsVariable("company"))
            {
                companyName = room.GetVariable("company").GetStringValue();
                if (room.ContainsVariable("starttime"))
                {
                    string startTimeStr = room.GetVariable("starttime").GetStringValue();

                    DateTime startTime = MsgStringToDateTime(startTimeStr);
                    Debug.Log("Sim was started: " + startTime.ToString());

                    if (forceNewGame || DateTime.UtcNow.Subtract(startTime).TotalHours >= 1.0)
                    {
                        Debug.Log("Last business simulation finished, start a new one");
                        // start a new game
                        companyName = GetUniqueCompanyName();
                        SetNewCompanyName(companyName);
                        forceNewGame = false;
                    }
                }
                else
                {
                    Debug.LogError("room needs to have a starttime variable setup on the server");
                }
            }
            else
            {
                Debug.LogError("Shouldn't get here -- Need to create a company variable via the server interface!!!");
                // create a company name -- this won't be persistent though, it dies when this user disconnects
                companyName = GetUniqueCompanyName();
                SetNewCompanyName(companyName);
            }
            AutoLogin(companyName);
            break;

        case SimPlayMode.MULTI_PLAYER:
            gameID      = TeamInfo.Inst.GetBizSimGameId(CommunicationManager.CurrentTeamID);
            simType     = (overrideSimType == "") ? TeamInfo.Inst.GetSimType(CommunicationManager.CurrentTeamID) : overrideSimType;
            simType     = string.IsNullOrEmpty(simType) ? "uimx_sustain" : simType;
            companyName = GetMultiplayerTeamName();
            AutoLogin(companyName);
            break;

        case SimPlayMode.DEMO:
            simType = (overrideSimType == "") ? "uimx_sustain" : overrideSimType;
            AutoLogin("Demo");
            break;

        case SimPlayMode.ADMIN_PLAYER:
            Debug.LogError("Admin Player is not currently implemented");
            break;
        }

        SetupSimType(simType);

        // update current tabs
        for (int i = 0; room != null && i < productMgr.NumProducts; ++i)
        {
            if (room.ContainsVariable("cat" + i))
            {
                HandleTabMsg(room, "cat" + i);
            }
        }

        for (int i = 0; i < ProductManagementScreen.GetAll().Count; ++i)
        {
            string varName = "prdurl" + i;
            if (room != null && room.ContainsVariable(varName))
            {
                ProductManagementScreen screen = ProductManagementScreen.GetAll()[i];
                string url = (screen.Initialized) ? BizSimScreen.GetStageItemURL(screen.StageItem) : room.GetVariable(varName).GetStringValue();
                screen.HandleNewURL(url);
                if (overrideSimType != "")
                {
                    ProductManagementScreen.GetAll()[i].UpdateServerWithNewURL(url);
                }
            }
        }
        MainCameraController.Inst.snapCamMakesPlayersInvisible = true;
    }