Example #1
0
        private void ClothesChanged(int oldvalue, int newvalue)
        {
            App.Model.Master.MEquipment mEquipment = null;
            if (newvalue == 0)
            {
                App.Model.Master.MCharacter character = CharacterCacher.Instance.Get(ViewModel.CharacterId.Value);
                mEquipment = EquipmentCacher.Instance.GetEquipment(character.clothes, App.Model.Master.MEquipment.EquipmentType.clothes);
                newvalue   = character.clothes;
            }
            else
            {
                mEquipment = EquipmentCacher.Instance.GetEquipment(newvalue, MEquipment.EquipmentType.clothes);
            }
            bool isArmor = (mEquipment.clothes_type == MEquipment.ClothesType.armor);

            clothesUpShort.gameObject.SetActive(isArmor);
            clothesDownShort.gameObject.SetActive(isArmor);
            armLeftShort.gameObject.SetActive(isArmor);
            armRightShort.gameObject.SetActive(isArmor);

            clothesUpLong.gameObject.SetActive(!isArmor);
            clothesDownLong.gameObject.SetActive(!isArmor);
            armLeftLong.gameObject.SetActive(!isArmor);
            armRightLong.gameObject.SetActive(!isArmor);

            ClothesUp.spriteMesh   = ImageAssetBundleManager.GetClothesUpMesh(newvalue);
            ClothesDown.spriteMesh = ImageAssetBundleManager.GetClothesDownMesh(newvalue);
        }
Example #2
0
        private void ClothesChanged()
        {
            Model.Equipment.MEquipment mEquipment = mCharacter.equipmentClothes;
            bool isArmor = (mEquipment.clothesType == ClothesType.armor);

            clothesUpShort.gameObject.SetActive(isArmor);
            clothesDownShort.gameObject.SetActive(isArmor);
            armLeftShort.gameObject.SetActive(isArmor);
            armRightShort.gameObject.SetActive(isArmor);

            clothesUpLong.gameObject.SetActive(!isArmor);
            clothesDownLong.gameObject.SetActive(!isArmor);
            armLeftLong.gameObject.SetActive(!isArmor);
            armRightLong.gameObject.SetActive(!isArmor);

            ClothesUp.spriteMesh   = ImageAssetBundleManager.GetClothesUpMesh(mEquipment.equipmentId);
            ClothesDown.spriteMesh = ImageAssetBundleManager.GetClothesDownMesh(mEquipment.equipmentId);
        }