UI HUGE UPDATE
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Bansonic;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
@@ -553,13 +554,12 @@ public class eFinalDream : MonoBehaviour
|
||||
private static Color ResolveEquipmentColor(int colorIndex)
|
||||
{
|
||||
equipItemPrefab reference = Object.FindFirstObjectByType<equipItemPrefab>(FindObjectsInactive.Include);
|
||||
if (reference == null || reference.itemBtmColors == null || reference.itemBtmColors.Length == 0)
|
||||
if (reference == null)
|
||||
{
|
||||
return Color.white;
|
||||
}
|
||||
|
||||
int safeIndex = Mathf.Clamp(colorIndex, 0, reference.itemBtmColors.Length - 1);
|
||||
return reference.itemBtmColors[safeIndex];
|
||||
return reference.GetAccentColorByVisualIndex(colorIndex);
|
||||
}
|
||||
|
||||
private void ClearSpawnedMaterialItems()
|
||||
@@ -639,6 +639,12 @@ public class eFinalDream : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
equipmentGenerator.SaveRuntimeEquipmentState(equipment);
|
||||
return;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
EditorUtility.SetDirty(equipment);
|
||||
AssetDatabase.SaveAssets();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Bansonic;
|
||||
|
||||
public class equipIllusion : MonoBehaviour
|
||||
{
|
||||
@@ -803,13 +804,12 @@ public class equipIllusion : MonoBehaviour
|
||||
}
|
||||
|
||||
equipItemPrefab itemPrefab = eip.GetComponent<equipItemPrefab>();
|
||||
if (itemPrefab == null || itemPrefab.itemBtmColors == null || itemPrefab.itemBtmColors.Length == 0)
|
||||
if (itemPrefab == null)
|
||||
{
|
||||
return Color.white;
|
||||
}
|
||||
|
||||
int safeIndex = Mathf.Clamp(colorIndex, 0, itemPrefab.itemBtmColors.Length - 1);
|
||||
return itemPrefab.itemBtmColors[safeIndex];
|
||||
return itemPrefab.GetAccentColorByVisualIndex(colorIndex);
|
||||
}
|
||||
|
||||
private static void PersistEquipment(equipmentSO equipment)
|
||||
@@ -819,6 +819,12 @@ public class equipIllusion : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
equipmentGenerator.SaveRuntimeEquipmentState(equipment);
|
||||
return;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.EditorUtility.SetDirty(equipment);
|
||||
if (!Application.isPlaying)
|
||||
|
||||
@@ -840,6 +840,12 @@ public class equipTransfer : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
equipmentGenerator.SaveRuntimeEquipmentState(equipment);
|
||||
return;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
EditorUtility.SetDirty(equipment);
|
||||
AssetDatabase.SaveAssets();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Bansonic;
|
||||
|
||||
public class equipUpdate : MonoBehaviour
|
||||
{
|
||||
@@ -509,6 +510,12 @@ public class equipUpdate : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
equipmentGenerator.SaveRuntimeEquipmentState(equipment);
|
||||
return;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.EditorUtility.SetDirty(equipment);
|
||||
if (!Application.isPlaying)
|
||||
@@ -538,13 +545,12 @@ public class equipUpdate : MonoBehaviour
|
||||
}
|
||||
|
||||
equipItemPrefab itemPrefab = eip.GetComponent<equipItemPrefab>();
|
||||
if (itemPrefab == null || itemPrefab.itemBtmColors == null || itemPrefab.itemBtmColors.Length == 0)
|
||||
if (itemPrefab == null)
|
||||
{
|
||||
return Color.white;
|
||||
}
|
||||
|
||||
int safeIndex = Mathf.Clamp(colorIndex, 0, itemPrefab.itemBtmColors.Length - 1);
|
||||
return itemPrefab.itemBtmColors[safeIndex];
|
||||
return itemPrefab.GetAccentColorByVisualIndex(colorIndex);
|
||||
}
|
||||
|
||||
private static bool IsLegalLevel(int level)
|
||||
|
||||
Reference in New Issue
Block a user