using System; using I2.Loc; using UnityEngine; public class PhotoNoCharaActive : MonoBehaviour { public void Awake() { this.label = base.GetComponentInChildren(); this.label.text = this.drawText; Localize localize = this.label.gameObject.AddComponent(); if (localize != null) { localize.SetTerm("ScenePhotoMode/" + this.drawText); } this.label.enabled = false; this.backupPos = this.mainContent.localPosition; } public void ChangeMode(bool isNoChara, bool windowsResize = true) { if (isNoChara) { if (windowsResize) { Vector2 vector = this.basePhotoWindow.WindowSize; this.basePhotoWindow.WindowSize = this.windowSize; this.basePhotoWindow.ResizeWindow(); this.basePhotoWindow.WindowSize = vector; } this.label.enabled = true; this.mainContent.localPosition = new Vector3(-6000f, -6000f, -6000f); } else { if (windowsResize) { this.basePhotoWindow.ResizeWindow(); } this.label.enabled = false; this.mainContent.localPosition = this.backupPos; } } public string drawText = "アクティブなキャラクターがいません"; public int fontSize = 22; public Vector2 windowSize = new Vector2(380f, 80f); public BasePhotoWindow basePhotoWindow; public Transform mainContent; private Vector3 backupPos; private UILabel label; }