Esempio n. 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)));
        }
Esempio n. 2
0
        public override IEnumerator OnLoad(Request request)
        {
            yield return(StartCoroutine(base.OnLoad(request)));

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

                Global.SUser.self.equipments = sEquipment.equipments;
            }
            if (request != null && request.Has("selectEvent"))
            {
                selectEvent = request.Get <System.Action <int> >("selectEvent");
            }
            else
            {
                selectEvent = null;
            }
            App.Model.Master.MEquipment.EquipmentType equipmentType = request.Get <App.Model.Master.MEquipment.EquipmentType>("equipmentType");
            App.Model.MEquipment[] equipments = System.Array.FindAll(Global.SUser.self.equipments,
                                                                     _ => _.EquipmentType == equipmentType && _.character_id == 0);
            Debug.LogError("equipmentType=" + equipmentType);
            if (equipmentType == App.Model.Master.MEquipment.EquipmentType.horse && request.Has("moveType"))
            {
                MoveType moveType = request.Get <MoveType>("moveType");
                Debug.LogError("moveType=" + moveType);
                equipments = System.Array.FindAll(equipments, e => e.Master.move_type == moveType);
            }
            foreach (App.Model.MEquipment equipment in equipments)
            {
                ScrollViewSetChild(content, childItem, equipment);
            }
            yield return(0);
        }