private void HorseChanged(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.horse, App.Model.Master.MEquipment.EquipmentType.horse); newvalue = character.horse; } else { mEquipment = EquipmentCacher.Instance.GetEquipment(newvalue, MEquipment.EquipmentType.horse); } if (mEquipment.move_type == App.Model.MoveType.cavalry) { horseBody.spriteMesh = ImageAssetBundleManager.GetHorseBodyMesh(mEquipment.image_index); horseFrontLegLeft.spriteMesh = ImageAssetBundleManager.GetHorseFrontLegLeftMesh(mEquipment.image_index); horseFrontLegRight.spriteMesh = ImageAssetBundleManager.GetHorseFrontLegRightMesh(mEquipment.image_index); horseHindLegLeft.spriteMesh = ImageAssetBundleManager.GetHorseHindLegLeftMesh(mEquipment.image_index); horseHindLegRight.spriteMesh = ImageAssetBundleManager.GetHorseHindLegRightMesh(mEquipment.image_index); horseSaddle.spriteMesh = ImageAssetBundleManager.GetHorseSaddleMesh(mEquipment.saddle); legLeft.spriteMesh = ImageAssetBundleManager.GetShoeLeftMesh(App.Util.Global.Constant.shoe_default_index); legRight.spriteMesh = ImageAssetBundleManager.GetShoeRightMesh(App.Util.Global.Constant.shoe_default_index); } else { legLeft.spriteMesh = ImageAssetBundleManager.GetShoeLeftMesh(mEquipment.image_index); legRight.spriteMesh = ImageAssetBundleManager.GetShoeRightMesh(mEquipment.image_index); } }
private void HorseChanged() { Model.Equipment.MEquipment mEquipment = mCharacter.equipmentHorse; if (mEquipment.moveType == MoveType.cavalry) { horseBody.spriteMesh = ImageAssetBundleManager.GetHorseBodyMesh(mEquipment.imageIndex); horseFrontLegLeft.spriteMesh = ImageAssetBundleManager.GetHorseFrontLegLeftMesh(mEquipment.imageIndex); horseFrontLegRight.spriteMesh = ImageAssetBundleManager.GetHorseFrontLegRightMesh(mEquipment.imageIndex); horseHindLegLeft.spriteMesh = ImageAssetBundleManager.GetHorseHindLegLeftMesh(mEquipment.imageIndex); horseHindLegRight.spriteMesh = ImageAssetBundleManager.GetHorseHindLegRightMesh(mEquipment.imageIndex); horseSaddle.spriteMesh = ImageAssetBundleManager.GetHorseSaddleMesh(mEquipment.saddle); legLeft.spriteMesh = ImageAssetBundleManager.GetShoeLeftMesh(App.Util.Global.Constant.shoe_default_index); legRight.spriteMesh = ImageAssetBundleManager.GetShoeRightMesh(App.Util.Global.Constant.shoe_default_index); } else { legLeft.spriteMesh = ImageAssetBundleManager.GetShoeLeftMesh(mEquipment.imageIndex); legRight.spriteMesh = ImageAssetBundleManager.GetShoeRightMesh(mEquipment.imageIndex); } }