// Use this for initialization void Start() { // Grab the master and the controller MAS_GameLoop tempMaster = (MAS_GameLoop)COM_Director.GetMaster("MAS_GameLoop"); controller = (CON_GameLoop)tempMaster.GetController("CON_GameLoop"); if (controller == null) { Debug.Log("LOOP: controller was NULL!!!!"); } else { Debug.Log("LOOP: controller is GOOD!"); } // Hide the empty playlist panel playlistEmptyPanel.SetActive(false); // Get the total round count for this play list totalRoundCount = controller.GetRoundCount(); playIndex = ZERO_INDEX; loopIterations = STARTING_ITERATION; passLocked = controller.IsPassLocked(); maxIterations = controller.GetIterationNumber(); customTexture1 = new Texture2D(XY_DIMENSION, XY_DIMENSION); customTexture2 = new Texture2D(XY_DIMENSION, XY_DIMENSION); customTexture3 = new Texture2D(XY_DIMENSION, XY_DIMENSION); Debug.Log(string.Format("Pass locked is {0} and loop iterations are {1} and infinite loop is {2}", passLocked, maxIterations, infiniteLoop)); Debug.Log("VW: Total round count is " + totalRoundCount.ToString()); if (totalRoundCount == 0) { playlistEmptyPanel.SetActive(true); } else if (passLocked && frontLocked) { Debug.Log("PAUSE THEN CONTINUE COROUTINE START"); StartCoroutine(PauseThenContinue()); } else { Debug.Log("UPDATING BAR"); UpdateProgressBar(0); Debug.Log("BAR UPDATED! ACTIVATING CANVASSES"); ActivateDeactivateCanvass(controller.GetPlayEntry(playIndex).type_id); } ResetRoundListCount(); UpdateProgressBar(CalculateRoundsTillReward()); Debug.Log("Game Loop View STARTED!"); }
public CON_GameLoop(MasterClass newMaster) : base(newMaster) { master = (MAS_GameLoop)newMaster; }