public void Init(bool bTweenWeapon = false, bool bTweenArmor = false) { if (m_Creature.Weapon.Info.Grade == 6 && m_Creature.Weapon.EnchantLevel == 5) { if (m_Weapon != null) { if (EquipEnchantPrefab.Contains(m_Weapon.gameObject) == true) { EquipEnchantPrefab.Free(m_Weapon.gameObject); m_Weapon = null; } } if (m_Weapon == null) { m_Weapon = EquipEnchantMaxPrefab.GetNewObject <EquipEnchant>(m_WeaponIndicator.transform, Vector3.zero); } } else { if (m_Weapon != null) { if (EquipEnchantMaxPrefab.Contains(m_Weapon.gameObject) == true) { EquipEnchantMaxPrefab.Free(m_Weapon.gameObject); m_Weapon = null; } } if (m_Weapon == null) { m_Weapon = EquipEnchantPrefab.GetNewObject <EquipEnchant>(m_WeaponIndicator.transform, Vector3.zero); } } if (m_Creature.Armor.Info.Grade == 6 && m_Creature.Armor.EnchantLevel == 5) { if (m_Armor != null) { if (EquipEnchantPrefab.Contains(m_Armor.gameObject) == true) { EquipEnchantPrefab.Free(m_Armor.gameObject); m_Armor = null; } } if (m_Armor == null) { m_Armor = EquipEnchantMaxPrefab.GetNewObject <EquipEnchant>(m_ArmorIndicator.transform, Vector3.zero); } } else { if (m_Armor != null) { if (EquipEnchantMaxPrefab.Contains(m_Armor.gameObject) == true) { EquipEnchantMaxPrefab.Free(m_Armor.gameObject); m_Armor = null; } } if (m_Armor == null) { m_Armor = EquipEnchantPrefab.GetNewObject <EquipEnchant>(m_ArmorIndicator.transform, Vector3.zero); } } m_Weapon.Init(m_Creature.Weapon, OnEnchantCallback, bTweenWeapon); m_Armor.Init(m_Creature.Armor, OnEnchantCallback, bTweenArmor); }