fenix 8 years ago
parent
commit
27e5c2f5f1

+ 5 - 2
Assets/Scripts/Battle/Map/Craft/PowerManager.cs

@@ -136,9 +136,12 @@ public class PowerManager
 
 	public Power GetCrystalPowerByIndex(int index)
 	{
-		if(index >= 0 && index < crystalPowers.Length)
+		if(crystalPowers != null)
 		{
-			return crystalPowers[index];
+			if(index >= 0 && index < crystalPowers.Length)
+			{
+				return crystalPowers[index];
+			}
 		}
 		return null;
 	}

+ 1 - 0
Assets/Scripts/UI/Battle/PowerIcon.cs

@@ -55,6 +55,7 @@ public class PowerIcon : MonoBehaviour
 			activating = false;
 		}
 		activatingImage.enabled = activating;
+		transform.localScale = power != null ? Vector3.one : Vector3.zero;
 	}
 	
 	public void OnClick()