public override void OnRegister() { int charId = view.charId; _userCharVO = gameConfig.userCharConfig.getUserCharVOById(charId); view.init(_userCharVO, gameConfig); updateCharInfo(); UpdateListeners(true); }
private void initDialogCharInfo(int dialogId, IUserCharVO userCharVO) { GameObject userDialog = view.getUserDialog(DialogType.CHAR_INFO, dialogId); DialogCharInfoView charInfoView = userDialog.GetComponent <DialogCharInfoView> (); if (charInfoView) { IUserCharInfoVO userCharInfoVO = userCharVO.getUserCharInfoVO(gameConfig); IWeaponModel weaponModel = new WeaponModel(userCharVO.id, gameConfig); charInfoView.init(userCharInfoVO, weaponModel, dialogId); } }
internal void init(IUserCharVO userCharVO, IGameConfig gameConfig) { _userCharVO = userCharVO; _gameConfig = gameConfig; List <string> info_names = gameConfig.weaponConfig.getInfoListByOwnerId(userCharVO.classId); updatePlayerInfo(); buttonAddExp.onClick.AddListener(addExp); buttonSaveAndExit.onClick.AddListener(saveAndExit); buttonExit.onClick.AddListener(exit); }
internal void init(IUserCharVO userCharVO, IGameConfig gameConfig) { _gameConfig = gameConfig; List <string> info_names = gameConfig.weaponConfig.getInfoListByOwnerId(userCharVO.classId); int weaponId = (info_names.Count < userCharVO.weaponId) ? userCharVO.weaponId / info_names.Count : userCharVO.weaponId; initDropDown(dropDownWeapon, info_names, weaponId - 1); initDropDown(dropDownItem2, gameConfig.itemConfig.info_names, userCharVO.itemId2 - 1); initDropDown(dropDownItem3, gameConfig.itemConfig.info_names, userCharVO.itemId3 - 1); initDropDown(dropDownEquiped, gameConfig.equipedConfig.info_names, userCharVO.equipedId - 1); addEventListeners(); }
private void onLoadedGameData() { destroyPanels(); for (byte i = 0; i < gameConfig.userCharConfig.list.Count; i++) { IUserCharVO userCharVO = gameConfig.userCharConfig.list[i]; if (userCharVO.classId > 0 && i < MAX_ITEMS_COUNT) { initDialogCharInfo(i + 1, userCharVO); } else { initDialogCharList(i + 1); } } }
private void onAddItem(int dialogId, int charId) { IUserCharVO userCharVO = (gameConfig != null) ? gameConfig.userCharConfig.getUserCharVOById(charId) : null; initDialogCharInfo(dialogId, userCharVO); }