#28314 Dangerの表示において、全画面が赤く明滅するようなエフェクトを追加。
@@ -10,6 +10,7 @@ | ||
10 | 10 | internal class CAct演奏Danger共通 : CActivity |
11 | 11 | { |
12 | 12 | private CTextureAf txDANGER; |
13 | + private CTexture txRedScreen; | |
13 | 14 | private bool bDanger中; |
14 | 15 | // = { false, false, false }; |
15 | 16 | private CCounter ct移動用; |
@@ -44,6 +45,20 @@ | ||
44 | 45 | if (b活性化してる) |
45 | 46 | { |
46 | 47 | this.txDANGER = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenPlayDrums danger.png"), false); |
48 | + | |
49 | + using ( Bitmap bmp = new Bitmap( SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height ) ) | |
50 | + { | |
51 | + using ( var g = Graphics.FromImage( bmp ) ) | |
52 | + { | |
53 | + using ( var brush = new SolidBrush( Color.Red ) ) | |
54 | + { | |
55 | + g.FillRectangle( brush, 0, 0, bmp.Width, bmp.Height ); | |
56 | + } | |
57 | + } | |
58 | + this.txRedScreen = TextureFactory.tテクスチャの生成( bmp ); | |
59 | + } | |
60 | + | |
61 | + | |
47 | 62 | base.OnManagedリソースの作成(); |
48 | 63 | } |
49 | 64 | } |
@@ -52,6 +67,7 @@ | ||
52 | 67 | { |
53 | 68 | if (b活性化してる) |
54 | 69 | { |
70 | + TextureFactory.tテクスチャの解放(ref this.txRedScreen); | |
55 | 71 | TextureFactory.tテクスチャの解放(ref this.txDANGER); |
56 | 72 | base.OnManagedリソースの解放(); |
57 | 73 | } |
@@ -86,8 +102,13 @@ | ||
86 | 102 | return 0; |
87 | 103 | } |
88 | 104 | int num = this.ct透明度用.n現在の値; |
89 | - if (this.txDANGER != null) | |
105 | + if ( txRedScreen != null ) | |
90 | 106 | { |
107 | + this.txRedScreen.n透明度 = ( ( ( num < 180 ) ? num : ( 360 - num ) ) * 256 / 180) / 3 ; | |
108 | + this.txRedScreen.t2D描画( CDTXMania.Instance.Device, 0, 0 ); | |
109 | + } | |
110 | + if ( this.txDANGER != null ) | |
111 | + { | |
91 | 112 | this.txDANGER.n透明度 = 60 + ((num < 180) ? num : (360 - num)); |
92 | 113 | } |
93 | 114 | num = this.ct移動用.n現在の値; |