public override void Start() { getActer(); if (!mActer || !mTarget) { Debug.Log("No acter and/or target set, or there is nothing in the Exchange list."); mComplete = true; return; } //get the exchange menu mExchangeMenu = mPlayer.mHud.mExchangeMenu; if (!mExchangeMenu) { Debug.Log("Didn't find the ExchangeMenu"); } //do we need to get a menu selection? if (mExchangeList.Count == 0) { mWaitForMenu = true; /*if (!mExchangeMenu.mInUse) * mExchangeMenu.populate(mActer, mTarget); * else * { * mQForMenu = true; * }*/ mQForMenu = true; } }
//------------------------------------------------------------------------------------------------- // unity methods //------------------------------------------------------------------------------------------------- void Awake() { UI.StoreSelectBoxSkin(mSelectBoxSkin); setPlayingArea(); mSideBar = GetComponentInChildren <SideBar>(); if (!mSideBar) { Debug.LogError("Can't find SideBar in HUD"); } mSelectionBox = GetComponentInChildren <SelectionBox>(); if (!mSelectionBox) { Debug.Log("Can't find SelectionBox in HUD. I disabled it."); } mPopMenu = GetComponentInChildren <PopMenu>(); if (!mPopMenu) { Debug.LogError("Can't find PopMenu in HUD"); } //mPopMenu.gameObject.SetActive(false); mExchangeMenu = GetComponentInChildren <ExchangeMenu>(); if (!mExchangeMenu) { Debug.LogError("Can't find ExchangeMenu in HUD"); } mExchangeMenu.gameObject.SetActive(false); mEquipMenu = GetComponentInChildren <EquipMenu>(); if (!mEquipMenu) { Debug.LogError("Can't find EquipMenu in HUD"); } mEquipMenu.gameObject.SetActive(false); //get the canvases List <Canvas> clist = new List <Canvas>(GetComponentsInChildren <Canvas>()); foreach (Canvas c in clist) { if (c.gameObject.name == "ScreenBarsCanvas") { mScreenBarsCanvas = c; } else if (c.gameObject.name == "CameraSpaceCanvas") { mCameraSpaceCanvas = c; } else { Debug.LogWarning("Canvas with name " + c.gameObject.name + " not recognised"); } } }