public void UpdateSlot() { int temp = (int)m_z; if (temp != __z) { __z = temp; armature.UpdateSlotZOrder(this); } }
public void UpdateSlot() { if (transform.childCount > 0) { int tempIndex = Mathf.RoundToInt(m_DisplayIndex); if (transform.childCount > 0 && Mathf.Abs(m_DisplayIndex - tempIndex) < 0.0001f) { if (tempIndex != __displayIndex) { if (__displayIndex > -1) { transform.GetChild(__displayIndex).gameObject.SetActive(false); } if (tempIndex > -1) { transform.GetChild(tempIndex).gameObject.SetActive(true); } __displayIndex = tempIndex; UpdateCurrentDisplay(); } } } #if UNITY_EDITOR if (!Application.isPlaying) { UpdateCurrentDisplay(); } #endif UpdateDisplayColor(); int temp = Mathf.RoundToInt(m_z); if (Mathf.Abs(m_z - temp) > 0.0001f) { return; } if (temp != __z) { __z = temp; armature.UpdateSlotZOrder(this); } }