OSDN Git Service

36f4504be08e3dcc2f6405eec5807a36fcf0c285
[dtxmania/dtxmania.git] / DTXMania / コード / ステージ / 10.ChangeSkin / CStageChangeSkin.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using System.Diagnostics;
5 using System.Threading;
6 using System.IO;
7 using FDK;
8 using System.Runtime.Serialization.Formatters.Binary;
9
10
11 namespace DTXMania
12 {
13         /// <summary>
14         /// box.defによるスキン変更時に一時的に遷移する、スキン画像の一切無いステージ。
15         /// </summary>
16         internal class CStageChangeSkin : CStage
17         {
18                 public CStageChangeSkin()
19                 {
20                         base.eステージID = CStage.Eステージ.ChangeSkin;
21                         base.b活性化してない = true;
22                 }
23
24                 public override void On活性化()
25                 {
26                         if (b活性化してない)
27                         {
28                                 Trace.TraceInformation("スキン変更ステージを活性化します。");
29                                 Trace.Indent();
30                                 try
31                                 {
32                                         base.On活性化();
33                                         Trace.TraceInformation("スキン変更ステージの活性化を完了しました。");
34                                 }
35                                 finally
36                                 {
37                                         Trace.Unindent();
38                                 }
39                         }
40                 }
41
42                 public override void On非活性化()
43                 {
44                         if (b活性化してる)
45                         {
46                                 Trace.TraceInformation("スキン変更ステージを非活性化します。");
47                                 Trace.Indent();
48                                 try
49                                 {
50                                         base.On非活性化();
51                                         Trace.TraceInformation("スキン変更ステージの非活性化を完了しました。");
52                                 }
53                                 finally
54                                 {
55                                         Trace.Unindent();
56                                 }
57                         }
58                 }
59
60                 public override int On進行描画()
61                 {
62                         if (base.b活性化してる)
63                         {
64                                 if (base.b初めての進行描画)
65                                 {
66                                         base.b初めての進行描画 = false;
67                                         return 0;
68                                 }
69
70                                 //スキン変更処理
71                                 tChangeSkinMain();
72                                 return 1;
73                         }
74                         return 0;
75                 }
76
77                 public void tChangeSkinMain()
78                 {
79                         Trace.TraceInformation("スキン変更:" + CDTXMania.Instance.Skin.GetCurrentSkinSubfolderFullName(false));
80
81                         CDTXMania.Instance.act文字コンソール.On非活性化();
82
83                         CDTXMania.Instance.Skin.PrepareReloadSkin();
84                         CDTXMania.Instance.Skin.ReloadSkin();
85
86                         CDTXMania.Instance.act文字コンソール.On活性化();
87                 }
88         }
89 }