12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- using System;
- using I2.Loc;
- using MaidStatus;
- using UnityEngine;
- public class SimpleMaidPlate : MonoBehaviour
- {
- public void Awake()
- {
- this.thumbnail_sprite_ = UTY.GetChildObject(base.gameObject, "Plate/FrameThumbnail/Thum", false).GetComponent<UI2DSprite>();
- this.last_name_label_ = UTY.GetChildObject(base.gameObject, "Plate/FrameBaseData/TextLastName", false).GetComponent<UILabel>();
- this.first_name_label_ = UTY.GetChildObject(base.gameObject, "Plate/FrameBaseData/TextFirstName", false).GetComponent<UILabel>();
- this.leader_plate_ = UTY.GetChildObject(base.gameObject, "Plate/FrameBaseData/LeaderPlate", false);
- if (UTY.GetChildObject(base.gameObject, "Plate/FrameThumbnail/Engage", true) != null)
- {
- this.engage_heart_ = UTY.GetChildObject(base.gameObject, "Plate/FrameThumbnail/Engage", false).GetComponent<UILabel>();
- }
- }
- public void SetMaidData(Maid maid)
- {
- if (maid == null)
- {
- return;
- }
- Status status = maid.status;
- NamePair charaName = status.charaName;
- this.last_name_label_.text = charaName.name1;
- this.first_name_label_.text = charaName.name2;
- if (maid.boMAN)
- {
- this.last_name_label_.text = string.Empty;
- if (maid.ActiveSlotNo == 0)
- {
- this.first_name_label_.text = "主人公";
- if (Product.supportMultiLanguage)
- {
- this.first_name_label_.text = LocalizationManager.GetTermTranslation("ScenePhotoMode/プレイヤー名/主人公", true, 0, true, false, null, Product.EnumConvert.ToI2LocalizeLanguageName(Product.defaultLanguage));
- }
- }
- else
- {
- this.first_name_label_.text = "男" + maid.ActiveSlotNo.ToString();
- if (Product.supportMultiLanguage)
- {
- this.first_name_label_.text = LocalizationManager.GetTermTranslation("ScenePhotoMode/プレイヤー名/男", true, 0, true, false, null, Product.EnumConvert.ToI2LocalizeLanguageName(Product.defaultLanguage)) + maid.ActiveSlotNo.ToString();
- }
- }
- }
- if (this.engage_heart_ != null)
- {
- this.engage_heart_.enabled = false;
- }
- this.leader_plate_.SetActive(status.leader);
- Texture2D thumIcon = maid.GetThumIcon();
- if (thumIcon != null)
- {
- Sprite sprite2D = Sprite.Create(thumIcon, new Rect(0f, 0f, (float)thumIcon.width, (float)thumIcon.height), default(Vector2));
- this.thumbnail_sprite_.sprite2D = sprite2D;
- }
- else
- {
- this.thumbnail_sprite_.sprite2D = null;
- }
- }
- private UI2DSprite thumbnail_sprite_;
- private UILabel last_name_label_;
- private UILabel first_name_label_;
- private UILabel engage_heart_;
- private GameObject leader_plate_;
- }
|