void UpdateAttributePanel( IBowPanel bowPanel, IBowConfigData bowConfigData ) { int[] attributeLevels = bowConfigData.GetAttributeLevels(); int bowIndex = bowPanel.GetIndex(); int attributeIndex = 0; foreach (int attributeLevel in attributeLevels) { bowPanel.SetAttributeLevel( attributeIndex, attributeLevel, true ); IBowAttributeLevelUpHoldButton levelUpButton = bowPanel.GetBowAttributeLevelUpHoldButtons()[attributeIndex]; if (attributeLevel == thisPlayerDataManager.GetMaxAttributeLevel()) { levelUpButton.MaxOut(); } else { int nextLevel = attributeLevel + 1; int nextCost = CalculateCost( bowIndex, nextLevel ); levelUpButton.SetNextCost(nextCost); int currency = thisPlayerDataManager.GetCurrency(); if (currency < nextCost) { levelUpButton.InvalidateForShortMoney(); } else { levelUpButton.ValidateForLevelUp(); } } attributeIndex += 1; } int equippedBowIndex = thisPlayerDataManager.GetEquippedBowIndex(); Debug.Log( "BowPanel " + bowPanel.GetIndex().ToString() + ", " + "unlocked: " + bowConfigData.IsUnlocked().ToString() + ", " + "equipped: " + (bowIndex == equippedBowIndex).ToString() + ", " + "bowLevel: " + bowConfigData.GetBowLevel().ToString() + ", " + "attLevels: " + DKUtility.DebugHelper.GetIndicesString(attributeLevels) ); }