// 更新某個區域的toggle是否顯示 protected void updateWarDataPic(bool bIsActive, int nIndex) { int nCount = DataChartPlayers.Count; for (int i = 0; i < nCount; ++i) { UDataChartPlayer uPlayer = DataChartPlayers[i]; if (uPlayer == null) { continue; } uPlayer.setWarData(dicToggle[nIndex], bIsActive); } }
// 當點擊某一個toggle時 protected void onChickChildToggle(bool bActive) { Toggle target = tmpToggle ? tmpToggle : EventSystem.current.currentSelectedGameObject.GetComponent <Toggle>(); int nCount = DataChartPlayers.Count; for (int i = 0; i < nCount; ++i) { UDataChartPlayer uPlayer = DataChartPlayers[i]; if (uPlayer == null) { continue; } uPlayer.setWarData(target, bActive); } //setWarData }