12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System;
- using UnityEngine;
- public class DanceSelectMusicInfo
- {
- public DanceSelectMusicInfo(GameObject root_obj)
- {
- this.root_obj_ = root_obj;
- this.title_label_ = UTY.GetChildObject(this.root_obj_, "BG/TitleFrame/Value", false).GetComponent<UILabel>();
- Transform transform = this.root_obj_.transform.Find("BG/InfoFrame/Value");
- if (transform)
- {
- this.info_label_ = transform.GetComponent<UILabel>();
- }
- this.dance_num_label_ = UTY.GetChildObject(this.root_obj_, "BG/InfoFrame/Value2", false).GetComponent<UILabel>();
- this.image_sprite_ = UTY.GetChildObject(this.root_obj_, "BG/Image", false).GetComponent<UI2DSprite>();
- }
- public void Release()
- {
- this.image_sprite_.sprite2D = null;
- }
- public void SetDanceData(DanceData data)
- {
- this.title_label_.text = data.title.Replace("\n", string.Empty);
- if (this.info_label_)
- {
- this.info_label_.text = data.commentary_text;
- }
- this.dance_num_label_.text = "ダンス人数 : " + data.select_chara_num + "人";
- this.Release();
- string text = (RhythmAction_Mgr.NowDance != RhythmAction_Mgr.DanceType.Challenge) ? data.sample_image_name : data.danceshow_image;
- Texture2D texture2D = Resources.Load<Texture2D>("SceneDanceSelect/Atlas/" + text);
- Sprite sprite = Sprite.Create(texture2D, new Rect(0f, 0f, (float)texture2D.width, (float)texture2D.height), default(Vector2));
- sprite.name = text;
- this.image_sprite_.sprite2D = sprite;
- GameMain.Instance.CharacterMgr.status.SetFlag("_ライブ背景", (data.bgType != DanceData.BgType.LiveStage) ? 0 : 1);
- }
- public GameObject InfoUI
- {
- get
- {
- return this.root_obj_;
- }
- }
- private GameObject root_obj_;
- private UILabel title_label_;
- private UILabel info_label_;
- private UILabel dance_num_label_;
- private UI2DSprite image_sprite_;
- }
|