public void SetData(FavorabilityNpcInfo info) { // _cvTxt.text = "CV:" + info.CV; // _birthdayTxt.text = "生日:" + info.Birthday; // _constellationTxt.text = "星座:" + info.Constellation; // _heightTxt.text = "身高:" + info.Height; // _weightTxt.text = "体重:" + info.Weight; // _bloodTypeTxt.text = "血型:" + info.BloodType; // _interestTxt.text = "兴趣:" + info.Interest; // _hobbyTxt.text = "爱好:" + info.Hobby; // _likeFoodTxt.text = "喜欢的食物:" + info.LikeFood; _cvTxt.text = I18NManager.Get("Favorability_NpcInfoCV", info.CV); _birthdayTxt.text = I18NManager.Get("Favorability_NpcInfoBirthday", info.Birthday); _constellationTxt.text = I18NManager.Get("Favorability_NpcInfoConstellation", info.Constellation); _heightTxt.text = I18NManager.Get("Favorability_NpcInfoHeight", info.Height); _weightTxt.text = I18NManager.Get("Favorability_NpcInfoWeight", info.Weight); _bloodTypeTxt.text = I18NManager.Get("Favorability_NpcInfoBloodType", info.BloodType); _interestTxt.text = I18NManager.Get("Favorability_NpcInfoInterest", info.Interest); _hobbyTxt.text = I18NManager.Get("Favorability_NpcInfoHobby", info.Hobby); _likeFoodTxt.text = I18NManager.Get("Favorability_NpcInfoLikeFood", info.LikeFood); _moreInfo = info.MoreInfo; _bg.texture = ResourceManager.Load <Texture>(info.BgPath); _moreInfoImg.sprite = ResourceManager.Load <Sprite>(info.BtnPath); _rawImage.texture = ResourceManager.Load <Texture>("Favorability/" + info.NpcId); //SendMessage(new Message(MessageConst.CMD_FACORABLILITY_PLAT_NPC_INFO_VOICE, // Message.MessageReciverType.CONTROLLER, info.VoiceId)); SetInfoBgAni(); }
public FavorabilityNpcInfo GetNpcInfo(PlayerPB playerPb) { var npcId = (int)playerPb; FavorabilityNpcInfo info = null; foreach (var t in _npcInfos) { if (t.NpcId == npcId) { info = t; break; } } return(info); }
public FavorabilityNpcInfo Clone() { FavorabilityNpcInfo info = new FavorabilityNpcInfo(); info.Name = Name; info.CV = CV; info.Birthday = Birthday; info.Constellation = Constellation; info.Height = Height; info.Weight = Weight; info.BloodType = BloodType; info.Interest = Interest; info.Hobby = Hobby; info.LikeFood = LikeFood; info.MoreInfo = MoreInfo; info.NpcId = NpcId; info.BgPath = BgPath; info.VoiceId = VoiceId; info.BtnPath = BtnPath; return(info); }