14 return this.types[this.altTitle ? 1 : 0];
19 public override void OnInit()
21 LayerTitle.Instance =
this;
22 this.textVersion.text = (
ELayer.core.version.GetText() ??
"");
23 this.textIntro.text = IO.LoadText(CorePath.CorePackage.TextData +
"intro.txt");
25 this.titleActor = Util.Instantiate<Transform>(this.titleActor,
null);
27 SoundManager.current.PlayBGM(this.CurrentTitle.bgmTitle, 0f, 0f);
33 this.titleActor.GetComponentInChildren<SpriteRenderer>().sprite = this.CurrentTitle.bg;
34 this.uiLight.color = this.CurrentTitle.light;
35 this.imageFog.color = this.CurrentTitle.fog;
36 this.OnChangeResolution();
40 public void OnClickStart()
43 SoundManager.current.PlayBGM(this.CurrentTitle.bgm, 0f, 0f);
47 public void OnChangeResolution()
49 this.imageBG.transform.localScale =
new Vector3(Mathf.Max(1f, 1.7777778f / ((
float)Screen.width / (
float)Screen.height)), 1f, 1f);
53 public void OnClickContinue()
59 public void OnClickConfig()
65 public void OnClickMod()
71 public void OnClickCredit()
77 public void OnClickAnnounce()
79 ELayer.ui.AddLayer(
"LayerAnnounce");
83 public void OnClickAbout()
85 ELayer.ui.AddLayer(
"LayerAbout");
89 public void OnClickFeedback()
91 ELayer.ui.ToggleFeedback();
95 public void OnClickExit()
97 if (Application.isEditor)
99 ELayer.ui.RemoveLayer(
this);
102 UnityEngine.Object.DestroyImmediate(
LayerTitle.actor.gameObject);
111 public override void OnKill()
113 UnityEngine.Object.DestroyImmediate(this.titleActor.gameObject);
116 ELayer.ui.RemoveLayer(this.embark);
117 UnityEngine.Object.DestroyImmediate(this.embark);
119 ELayer.ui.SetLight(
false);
123 private void Update()
126 if (!layer && SoundManager.current.currentBGM.id !=
this.CurrentTitle.bgmTitle.name)
130 this.altTitle = !this.altTitle;
132 SoundManager.current.PlayBGM(this.CurrentTitle.bgmTitle, 0f, 0f);
135 float num = Mathf.Clamp(this.cgBook.alpha + Time.smoothDeltaTime *
this.speed * (
float)(layer ? -1 : 1), 0f, 1f);
136 if (this.cgBook.alpha != num)
138 this.cgBook.alpha = num;
140 if (this.cgBG.alpha != num)
142 this.cgBG.alpha = num;
144 this.ray.enabled = (num == 1f);
148 public void OnChangeLanguage()
150 this.textIntro.text = IO.LoadText(CorePath.CorePackage.TextData +
"intro.txt");
154 public static void KillActor()
158 UnityEngine.Object.DestroyImmediate(
LayerTitle.actor.gameObject);
175 public UIText textVersion;
178 public UIText textIntro;
181 public Transform transBook;
184 public CanvasGroup cgBook;
187 public CanvasGroup cgBG;
193 public GraphicRaycaster ray;
196 public Transform titleActor;
199 public Image uiLight;
202 public RawImage imageFog;
205 public RawImage imageBG;
211 public bool altTitle;
230 public BGMData bgmTitle;