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 )
\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開始( 24, 0x38, 8, CDTXMania.Timer ); // 2011.2.17 yyagi: (0, 0x38, 4,..) -> (24, 0x38, 8) に変更 ギターチップの光り始めを早くするため
\r
32 public abstract void Start( int nLane );
\r
36 public override void On活性化()
\r
38 for( int i = 0; i < 6; i++ )
\r
40 this.pt中央位置[ i ] = new Point( 0, 0 );
\r
41 this.ct進行[ i ] = new CCounter();
\r
45 public override void On非活性化()
\r
47 for( int i = 0; i < 6; i++ )
\r
49 this.ct進行[ i ] = null;
\r
53 public override void OnManagedリソースの作成()
\r
55 if( !base.b活性化してない )
\r
57 this.tx火花[ 0 ] = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay chip fire red.png" ) );
\r
58 if( this.tx火花[ 0 ] != null )
\r
60 this.tx火花[ 0 ].b加算合成 = true;
\r
62 this.tx火花[ 1 ] = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay chip fire green.png" ) );
\r
63 if( this.tx火花[ 1 ] != null )
\r
65 this.tx火花[ 1 ].b加算合成 = true;
\r
67 this.tx火花[ 2 ] = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay chip fire blue.png" ) );
\r
68 if( this.tx火花[ 2 ] != null )
\r
70 this.tx火花[ 2 ].b加算合成 = true;
\r
72 base.OnManagedリソースの作成();
\r
75 public override void OnManagedリソースの解放()
\r
77 if( !base.b活性化してない )
\r
79 CDTXMania.tテクスチャの解放( ref this.tx火花[ 0 ] );
\r
80 CDTXMania.tテクスチャの解放( ref this.tx火花[ 1 ] );
\r
81 CDTXMania.tテクスチャの解放( ref this.tx火花[ 2 ] );
\r
82 base.OnManagedリソースの解放();
\r
85 public override int On進行描画()
\r
87 if( !base.b活性化してない )
\r
89 for( int i = 0; i < 6; i++ )
\r
91 this.ct進行[ i ].t進行();
\r
92 if( this.ct進行[ i ].b終了値に達した )
\r
94 this.ct進行[ i ].t停止();
\r
97 for( int j = 0; j < 6; j++ )
\r
99 if( ( this.ct進行[ j ].n現在の経過時間ms != -1 ) && ( this.tx火花[ j % 3 ] != null ) )
\r
101 float x = (float) ( 3.0 * Math.Cos( ( 3.1415926535897931 * ( 90.0 - ( 90.0 * ( ( (double) this.ct進行[ j ].n現在の値 ) / 56.0 ) ) ) ) / 180.0 ) );
\r
102 int num4 = this.pt中央位置[ j ].X - ( (int) ( ( this.tx火花[ j % 3 ].sz画像サイズ.Width * x ) / 2f ) );
\r
103 int y = this.pt中央位置[ j ].Y - ( (int) ( ( this.tx火花[ j % 3 ].sz画像サイズ.Height * x ) / 2f ) );
\r
104 this.tx火花[ j % 3 ].n透明度 = ( this.ct進行[ j ].n現在の値 < 0x1c ) ? 0xff : ( 0xff - ( (int) ( 255.0 * Math.Cos( ( 3.1415926535897931 * ( 90.0 - ( 90.0 * ( ( (double) ( this.ct進行[ j ].n現在の値 - 0x1c ) ) / 28.0 ) ) ) ) / 180.0 ) ) ) );
\r
105 this.tx火花[ j % 3 ].vc拡大縮小倍率 = new Vector3( x, x, 1f );
\r
106 this.tx火花[ j % 3 ].t2D描画( CDTXMania.app.Device, num4, y );
\r
116 #region [ private ]
\r
117 //-----------------
\r
118 private CCounter[] ct進行 = new CCounter[ 6 ];
\r
119 private Point[] pt中央位置 = new Point[ 6 ];
\r
120 private CTexture[] tx火花 = new CTexture[ 3 ];
\r
121 //-----------------
\r