• R/O
  • SSH
  • HTTPS

nlgp1: Commit


Commit MetaInfo

Revision840 (tree)
Time2011-03-02 08:35:49
Authorbiikame

Log Message

識別子を一部修正

Change Summary

Incremental Difference

--- trunk/Nlgp1/Nlgp1/Characters/SpriteFactory.cs (revision 839)
+++ trunk/Nlgp1/Nlgp1/Characters/SpriteFactory.cs (revision 840)
@@ -29,7 +29,7 @@
2929 break;
3030 case 4:
3131 #region ゆっくりと左に歩いてくる
32- character.Sprite.Stepped += new EventHandler<SpriteSteppedEventArgs>( ( sender , e ) => {
32+ character.Sprite.Stepping += new EventHandler<SpriteSteppingEventArgs>( ( sender , e ) => {
3333 e.SpriteOwner.Sprite.Body.ApplyForce( new Vector( -0.01f , 0 ) );
3434 } );
3535 #endregion
@@ -36,7 +36,7 @@
3636 break;
3737 case 5:
3838 #region ゆっくりと右に歩いてくる
39- character.Sprite.Stepped += new EventHandler<SpriteSteppedEventArgs>( ( sender , e ) => {
39+ character.Sprite.Stepping += new EventHandler<SpriteSteppingEventArgs>( ( sender , e ) => {
4040 e.SpriteOwner.Sprite.Body.ApplyForce( new Vector( +0.01f , 0 ) );
4141 } );
4242 #endregion
@@ -46,7 +46,7 @@
4646
4747 character.JumpPower = 4;
4848 character.UpGravity = 0.05f;
49- character.Sprite.Stepped += new EventHandler<SpriteSteppedEventArgs>( ( sender , e ) => {
49+ character.Sprite.Stepping += new EventHandler<SpriteSteppingEventArgs>( ( sender , e ) => {
5050 e.SpriteOwner.Sprite.Body.ApplyForce( new Vector( -0.01f , 0 ) );
5151 ( ( Character )( e.SpriteOwner ) ).StartJump();
5252 } );
@@ -56,7 +56,7 @@
5656 #region ジャンプしながら右に向かってくる
5757 character.JumpPower = 4;
5858 character.UpGravity = 0.05f;
59- character.Sprite.Stepped += new EventHandler<SpriteSteppedEventArgs>( ( sender , e ) => {
59+ character.Sprite.Stepping += new EventHandler<SpriteSteppingEventArgs>( ( sender , e ) => {
6060 ( ( Character)( e.SpriteOwner ) ).StartJump();
6161 } );
6262 #endregion
@@ -87,7 +87,7 @@
8787 character.Sprite.LogicParameter.Angle = 90; // 角度
8888 character.Sprite.LogicParameter.Speed = 1; // 速度
8989 character.Sprite.LogicParameter.LimitDistance = 100;// 移動距離
90- character.Sprite.Stepped += new EventHandler<SpriteSteppedEventArgs>( ( sender , e ) => {
90+ character.Sprite.Stepping += new EventHandler<SpriteSteppingEventArgs>( ( sender , e ) => {
9191 } );
9292 #endregion
9393 break;
@@ -96,7 +96,7 @@
9696 character.Sprite.CanActDefault = false; // 既定の重力計算などを無効にする。
9797 character.Sprite.LogicParameter.Radius = 100; // 半径
9898 character.Sprite.LogicParameter.Speed = 8; // 回転速度
99- character.Sprite.Stepped += new EventHandler<SpriteSteppedEventArgs>( ( sender , e ) => {
99+ character.Sprite.Stepping += new EventHandler<SpriteSteppingEventArgs>( ( sender , e ) => {
100100 } );
101101 #endregion
102102 break;
@@ -105,7 +105,7 @@
105105 character.Sprite.IsBlock = false;
106106 character.Sprite.LogicParameter.Speed = 2;
107107 character.Sprite.LogicParameter.Radius = 100;
108- character.Sprite.Stepped += new EventHandler<SpriteSteppedEventArgs>( ( sender , e ) => {
108+ character.Sprite.Stepping += new EventHandler<SpriteSteppingEventArgs>( ( sender , e ) => {
109109 // Sprite.HitStop( PlayerStatus.Player , e.Target );
110110 } );
111111 #endregion
@@ -116,7 +116,7 @@
116116 character.Sprite.LogicParameter.Speed = 2; // 上下に移動するときの速度
117117 character.Sprite.LogicParameter.Angle = 90; // 移動する方向。90度 = 上下方向。45度 = 斜めなど。
118118 character.Sprite.CanActDefault = false;
119- character.Sprite.Stepped += new EventHandler<SpriteSteppedEventArgs>( ( sender , e ) => {
119+ character.Sprite.Stepping += new EventHandler<SpriteSteppingEventArgs>( ( sender , e ) => {
120120 character.Sprite.LogicParameter.Angle++;
121121 } );
122122 #endregion
--- trunk/Nlgp1/Nlgp1/Sprites/SpriteSteppedEventArgs.cs (revision 839)
+++ trunk/Nlgp1/Nlgp1/Sprites/SpriteSteppedEventArgs.cs (nonexistent)
@@ -1,49 +0,0 @@
1-using System;
2-using System.Collections.Generic;
3-using System.Linq;
4-using System.Text;
5-using Nlgp1.Parameters;
6-using Nlgp1.Stages;
7-using Nlgp1.Common;
8-
9-namespace Nlgp1.Sprites {
10- /// <summary>
11- /// スプライトの行動が発生したときのイベント引数
12- /// </summary>
13- public class SpriteSteppedEventArgs : EventArgs {
14- /// <summary>
15- /// SpriteSteppedEventArgsクラスの新しいインスタンスを初期化します。
16- /// </summary>
17- /// <param name="target">対象のスプライト</param>
18- public SpriteSteppedEventArgs( ISpriteOwner spriteOwner ) {
19- this.SpriteOwner = spriteOwner;
20- }
21- /// <summary>
22- /// 対象のスプライトを取得します。
23- /// </summary>
24- public ISpriteOwner SpriteOwner {
25- get;
26- private set;
27- }
28- }
29-
30- /// <summary>
31- /// スプライトの行動が発生したときのイベント引数
32- /// </summary>
33- public class SpriteSteppedEventArgs<T> : EventArgs where T : ISpriteOwner {
34- /// <summary>
35- /// SpriteSteppedEventArgsクラスの新しいインスタンスを初期化します。
36- /// </summary>
37- /// <param name="target">対象のスプライト</param>
38- public SpriteSteppedEventArgs( T spriteOwner ) {
39- this.SpriteOwner = spriteOwner;
40- }
41- /// <summary>
42- /// 対象のスプライトを取得します。
43- /// </summary>
44- public T SpriteOwner {
45- get;
46- private set;
47- }
48- }
49-}
--- trunk/Nlgp1/Nlgp1/Sprites/SpriteSteppingEventArgs.cs (nonexistent)
+++ trunk/Nlgp1/Nlgp1/Sprites/SpriteSteppingEventArgs.cs (revision 840)
@@ -0,0 +1,49 @@
1+using System;
2+using System.Collections.Generic;
3+using System.Linq;
4+using System.Text;
5+using Nlgp1.Parameters;
6+using Nlgp1.Stages;
7+using Nlgp1.Common;
8+
9+namespace Nlgp1.Sprites {
10+ /// <summary>
11+ /// スプライトの行動が発生したときのイベント引数
12+ /// </summary>
13+ public class SpriteSteppingEventArgs : EventArgs {
14+ /// <summary>
15+ /// SpriteSteppingEventArgsクラスの新しいインスタンスを初期化します。
16+ /// </summary>
17+ /// <param name="target">対象のスプライト</param>
18+ public SpriteSteppingEventArgs( ISpriteOwner spriteOwner ) {
19+ this.SpriteOwner = spriteOwner;
20+ }
21+ /// <summary>
22+ /// 対象のスプライトを取得します。
23+ /// </summary>
24+ public ISpriteOwner SpriteOwner {
25+ get;
26+ private set;
27+ }
28+ }
29+
30+ /// <summary>
31+ /// スプライトの行動が発生したときのイベント引数
32+ /// </summary>
33+ public class SpriteSteppingEventArgs<T> : EventArgs where T : ISpriteOwner {
34+ /// <summary>
35+ /// SpriteSteppingEventArgsクラスの新しいインスタンスを初期化します。
36+ /// </summary>
37+ /// <param name="target">対象のスプライト</param>
38+ public SpriteSteppingEventArgs( T spriteOwner ) {
39+ this.SpriteOwner = spriteOwner;
40+ }
41+ /// <summary>
42+ /// 対象のスプライトを取得します。
43+ /// </summary>
44+ public T SpriteOwner {
45+ get;
46+ private set;
47+ }
48+ }
49+}
--- trunk/Nlgp1/Nlgp1/Sprites/Sprite.cs (revision 839)
+++ trunk/Nlgp1/Nlgp1/Sprites/Sprite.cs (revision 840)
@@ -73,7 +73,7 @@
7373 ActiveCellCount = 2;
7474 CanActDefault = true;
7575 startTick = StageMap.TickCount;
76- steppedEventParameter = new SpriteSteppedEventArgs( this.Owner );
76+ steppedEventArgs = new SpriteSteppingEventArgs( this.Owner );
7777
7878 this.Body = StageMap.World.CreateSpriteBody( this , position );
7979 if( layerType != LayerType.Character ) {
@@ -203,7 +203,7 @@
203203
204204 #region ロジック
205205
206- private SpriteSteppedEventArgs steppedEventParameter = null;
206+ private SpriteSteppingEventArgs steppedEventArgs = null;
207207
208208 /// <summary>
209209 /// キャラクタの既定の行動を行う
@@ -218,9 +218,13 @@
218218 }
219219 // 参考→http://d.hatena.ne.jp/Gemma/20080517/1211010942
220220
221- this.Body.Step();
221+ if( this.Stepping != null ) {
222+ this.Stepping( this , this.steppedEventArgs );
223+ }
222224
223- this.OnStepped( this , this.steppedEventParameter );
225+ if( this.Body != null ) {
226+ this.Body.Step();
227+ }
224228 }
225229 #endregion
226230
@@ -235,13 +239,7 @@
235239 /// <summary>
236240 /// 行動が発生して既定の行動が実行されたあとに発生します。
237241 /// </summary>
238- public event EventHandler<SpriteSteppedEventArgs> Stepped;
239-
240- private void OnStepped( object sender , SpriteSteppedEventArgs e ) {
241- if( this.Stepped != null ) {
242- this.Stepped( sender , e );
243- }
244- }
242+ public event EventHandler<SpriteSteppingEventArgs> Stepping;
245243 #endregion
246244
247245 #region IUnloadableComponent メンバー
--- trunk/Nlgp1/Nlgp1/Attacks/Shot.cs (revision 839)
+++ trunk/Nlgp1/Nlgp1/Attacks/Shot.cs (revision 840)
@@ -34,7 +34,7 @@
3434 gun.Initialize( this.GunTypeID , this , gunSize );
3535
3636 if( Initialized != null )
37- Initialized( this , new SpriteSteppedEventArgs<T>( gun ) );
37+ Initialized( this , new SpriteSteppingEventArgs<T>( gun ) );
3838
3939 lock( gunList )
4040 gunList.Add( gun );
@@ -94,6 +94,6 @@
9494 }
9595 #endregion
9696
97- public event EventHandler<SpriteSteppedEventArgs<T>> Initialized;
97+ public event EventHandler<SpriteSteppingEventArgs<T>> Initialized;
9898 }
9999 }
--- trunk/Nlgp1/Nlgp1/Attacks/Attack.cs (revision 839)
+++ trunk/Nlgp1/Nlgp1/Attacks/Attack.cs (revision 840)
@@ -25,7 +25,7 @@
2525 this.Character.Sprite.Unloaded += new EventHandler( ( sender , e ) => Unload() );
2626
2727 #region 攻撃状態の変化
28- this.Character.Sprite.Stepped += new EventHandler<SpriteSteppedEventArgs>( ( sender , e ) => {
28+ this.Character.Sprite.Stepping += new EventHandler<SpriteSteppingEventArgs>( ( sender , e ) => {
2929 if( ActionType == ActionType.None )
3030 return;
3131 else if( ActionType == ActionType.Starting && StageMap.TickCount - attackTick >= StartingWait && canAttack ) {
Show on old repository browser