public void InitData(CapsuleBattleModel model) { transform.GetText("AbilityAnimation/Active/Text").text = model.Active + ""; transform.GetText("AbilityAnimation/Financial/Text").text = model.Financial + ""; transform.GetText("AbilityAnimation/Resource/Text").text = model.Resource + ""; transform.GetText("AbilityAnimation/Transmission/Text").text = model.Transmission + ""; }
public override void Init() { _model = GetData <CapsuleBattleModel>(); _model.InitCardList(GlobalData.CardModel.UserCardList); View.SetData(_model.LevelVo, _model); EventDispatcher.AddEventListener <BattleUserCardVo>(EventConst.SmallHeroCardClick, OnSmallHeroCardClick); }
public override void Start() { EventDispatcher.AddEventListener(EventConst.CapsuleBattleUpdateSupporterNum, UpdatePowerData); _model = GetData <CapsuleBattleModel>(); view.SetData(_model.LevelVo, GlobalData.DepartmentData.Fanss); UpdatePowerData(); }
public override void SetData(params object[] paramsObjects) { if (paramsObjects != null && paramsObjects.Length > 0) { _model = RegisterModel <CapsuleBattleModel>(); RegisterModel <CapsuleBattleResultData>(); _model.LevelVo = (CapsuleLevelVo)paramsObjects[0]; MaxPower = _model.LevelVo.MaxPower; GetData <CapsuleBattleResultData>().Comments = (RepeatedField <LevelCommentRulePB>)paramsObjects[1]; _model.CardNumRules = (RepeatedField <ChallengeCardNumRulePB>)paramsObjects[2]; SdkHelper.StatisticsAgent.OnMissionBegin(_model.LevelVo.LevelMark); } }
public void SetData(LevelVo info, CapsuleBattleModel battleModel) { _info = info; _battleModel = battleModel; _battleModel.FilterCard(); ResetMiddleHeroCard(); transform.Find("BgTop/NeedStrengthText").GetComponent <Text>().text = I18NManager.Get("Battle_SuperStarViewNeedStrengthText", ViewUtil.AbilitiesToString(info.Abilitys)); transform.Find("BgTop/Panel/Original/ValueText").GetComponent <Text>().text = "0"; transform.Find("BgTop/Panel/Glamour/ValueText").GetComponent <Text>().text = "0"; transform.Find("BgTop/Panel/Popularity/ValueText").GetComponent <Text>().text = "0"; transform.Find("BgTop/Panel/Sing/ValueText").GetComponent <Text>().text = "0"; transform.Find("BgTop/Panel/Dancing/ValueText").GetComponent <Text>().text = "0"; transform.Find("BgTop/Panel/Willpower/ValueText").GetComponent <Text>().text = "0"; _smallCardList.RefreshCells(); _smallCardList.totalCount = _battleModel.UserCardList.Count; }
private void SendCapsuleBattleChallenge(CapsuleLevelVo level, List <BattleUserCardVo> cards) { int activityId = level.ActivityId; int levelId = level.LevelId; ChallengeActivityLevelReq req = new ChallengeActivityLevelReq(); req.ActivityId = activityId; req.LevelId = levelId; foreach (var vo1 in cards) { req.CardIds.Add(vo1.UserCardVo.CardId); } CapsuleBattleModel model = GetData <CapsuleBattleModel>(); req.Fans.Add(model.FansDict); req.Items.Add(model.ItemsDict); byte[] data = NetWorkManager.GetByteData(req); NetWorkManager.Instance.Send <ChallengeActivityLevelRes>(CMD.ACTIVITYSTENCILC_CHALLENGE, data, OnGetCapsuleChallenge, OnCapsuleChallengeError); }
public override void Start() { _model = GetData <CapsuleBattleModel>(); _model.InitSupporterValue(); view.InitData(_model); }