예제 #1
0
        public override IEnumerator OnLoad(Request request)
        {
            HideSkillDetail();
            int characterId = request.Get <int>("character_id");

            if (Global.SUser.self.equipments == null)
            {
                yield return(StartCoroutine(sEquipment.RequestList()));

                Global.SUser.self.equipments = sEquipment.equipments;
            }
            character = System.Array.Find(Global.SUser.self.characters, _ => _.CharacterId == characterId);
            character.StatusInit();
            characterDetail.BindingContext = character.ViewModel;
            characterDetail.UpdateView();
            vCard.BindingContext = character.ViewModel;
            vCard.UpdateView();
            characterGrade.BindingContext = character.ViewModel;
            characterGrade.UpdateView();
            vCharacter.BindingContext = character.ViewModel;
            vCharacter.UpdateView();
            vCharacterStatus.BindingContext = character.ViewModel;
            vCharacterStatus.UpdateView();
            vEquipment.BindingContext = character.ViewModel;
            vEquipment.UpdateView();
            vCharacterSkill.BindingContext = character.ViewModel;
            vCharacterSkill.UpdateView();
            contents = new VBase[] { vCharacterStatus, vEquipment, vCharacterSkill };
            ShowContentFromIndex(0);
            yield return(StartCoroutine(base.OnLoad(request)));
        }
예제 #2
0
        private IEnumerator EquipmentChange(int id)
        {
            yield return(StartCoroutine(sEquipment.RequestEquip(character.CharacterId, id)));

            App.Model.MEquipment mEquipment = System.Array.Find(Global.SUser.self.equipments, _ => _.Id == id);
            Global.SUser.self.equipments = sEquipment.equipments;
            if (mEquipment.EquipmentType == App.Model.Master.MEquipment.EquipmentType.weapon)
            {
                character.Weapon = mEquipment.EquipmentId;
            }
            else if (mEquipment.EquipmentType == App.Model.Master.MEquipment.EquipmentType.clothes)
            {
                character.Clothes = mEquipment.EquipmentId;
            }
            else if (mEquipment.EquipmentType == App.Model.Master.MEquipment.EquipmentType.horse)
            {
                character.Horse = mEquipment.EquipmentId;
            }
            character.StatusInit();
        }