2 using System.Collections.Generic;
\r
4 using System.Drawing;
\r
10 internal abstract class CAct演奏チップファイアGB : CActivity
\r
14 public CAct演奏チップファイアGB()
\r
16 base.b活性化してない = true;
\r
22 public virtual void Start( int nLane, int n中央X, int n中央Y, C演奏判定ライン座標共通 演奏判定ライン座標 )
\r
24 if( ( nLane >= 0 ) || ( nLane <= 5 ) )
\r
26 this.pt中央位置[ nLane ].X = n中央X;
\r
27 this.pt中央位置[ nLane ].Y = n中央Y;
\r
28 this.ct進行[ nLane ].t開始( 28, 56, 8, CDTXMania.Instance.Timer ); // #24736 2011.2.17 yyagi: (0, 0x38, 4,..) -> (24, 0x38, 8) に変更 ギターチップの光り始めを早くするため
\r
29 //this.nJudgeLinePosY_delta = _nJudgeLinePosY_delta; // #31602 2013.6.24 yyagi
\r
30 this._演奏判定ライン座標 = 演奏判定ライン座標;
\r
31 this.bReverse = CDTXMania.Instance.ConfigIni.bReverse; //
\r
35 public abstract void Start( int nLane, C演奏判定ライン座標共通 演奏判定ライン座標 );
\r
36 // public abstract void Start( int nLane );
\r
40 public override void On活性化()
\r
42 for( int i = 0; i < 6; i++ )
\r
44 this.pt中央位置[ i ] = new Point( 0, 0 );
\r
45 this.ct進行[ i ] = new CCounter();
\r
49 public override void On非活性化()
\r
51 for( int i = 0; i < 6; i++ )
\r
53 this.ct進行[ i ] = null;
\r
57 public override void OnManagedリソースの作成()
\r
59 if( !base.b活性化してない )
\r
61 this.tx火花[ 0 ] = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay chip fire red.png" ) );
\r
62 if( this.tx火花[ 0 ] != null )
\r
64 this.tx火花[ 0 ].b加算合成 = true;
\r
66 this.tx火花[ 1 ] = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay chip fire green.png" ) );
\r
67 if( this.tx火花[ 1 ] != null )
\r
69 this.tx火花[ 1 ].b加算合成 = true;
\r
71 this.tx火花[ 2 ] = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay chip fire blue.png" ) );
\r
72 if( this.tx火花[ 2 ] != null )
\r
74 this.tx火花[ 2 ].b加算合成 = true;
\r
76 base.OnManagedリソースの作成();
\r
79 public override void OnManagedリソースの解放()
\r
81 if( !base.b活性化してない )
\r
83 TextureFactory.tテクスチャの解放( ref this.tx火花[ 0 ] );
\r
84 TextureFactory.tテクスチャの解放( ref this.tx火花[ 1 ] );
\r
85 TextureFactory.tテクスチャの解放( ref this.tx火花[ 2 ] );
\r
86 base.OnManagedリソースの解放();
\r
89 public override int On進行描画()
\r
91 if( !base.b活性化してない )
\r
93 for( int i = 0; i < 6; i++ )
\r
95 this.ct進行[ i ].t進行();
\r
96 if( this.ct進行[ i ].b終了値に達した )
\r
98 this.ct進行[ i ].t停止();
\r
101 for( int j = 0; j < 6; j++ )
\r
103 if( ( this.ct進行[ j ].n現在の経過時間ms != -1 ) && ( this.tx火花[ j % 3 ] != null ) )
\r
105 float scale = (float) ( 3.0 * Math.Cos( ( Math.PI * ( 90.0 - ( 90.0 * ( ( (double) this.ct進行[ j ].n現在の値 ) / 56.0 ) ) ) ) / 180.0 ) );
\r
106 int x = (int) ( this.pt中央位置[ j ].X ) - ( (int) ( ( this.tx火花[ j % 3 ].sz画像サイズ.Width * scale ) / 2f ) );
\r
107 int y = (int) ( this.pt中央位置[ j ].Y ) - ( (int) ( ( this.tx火花[ j % 3 ].sz画像サイズ.Height * scale ) / 2f ) );
\r
108 this.tx火花[ j % 3 ].n透明度 = ( this.ct進行[ j ].n現在の値 < 0x1c ) ? 0xff : ( 0xff - ( (int) ( 255.0 * Math.Cos( ( Math.PI * ( 90.0 - ( 90.0 * ( ( (double) ( this.ct進行[ j ].n現在の値 - 0x1c ) ) / 28.0 ) ) ) ) / 180.0 ) ) ) );
\r
109 this.tx火花[ j % 3 ].vc拡大縮小倍率 = new Vector3( scale, scale, 1f );
\r
111 E楽器パート e楽器パート = ( j < 3 ) ? E楽器パート.GUITAR : E楽器パート.BASS; // BEGIN #31602 2013.6.24 yyagi
\r
112 int deltaY = _演奏判定ライン座標.nJudgeLinePosY_delta[ (int)e楽器パート ];
\r
113 if ( this.bReverse[ (int)e楽器パート ] )
\r
118 this.tx火花[ j % 3 ].t2D描画( CDTXMania.Instance.Device, x, y - deltaY );
\r
128 #region [ private ]
\r
129 //-----------------
\r
130 private CCounter[] ct進行 = new CCounter[ 6 ];
\r
131 private Point[] pt中央位置 = new Point[ 6 ];
\r
132 private CTexture[] tx火花 = new CTexture[ 3 ];
\r
133 //private STDGBVALUE<int> nJudgeLinePosY_delta = new STDGBVALUE<int>();
\r
134 C演奏判定ライン座標共通 _演奏判定ライン座標 = new C演奏判定ライン座標共通();
\r
135 private STDGBVALUE<bool> bReverse = new STDGBVALUE<bool>();
\r
136 //-----------------
\r