• R/O
  • SSH
  • HTTPS

nlgp1: Commit


Commit MetaInfo

Revision770 (tree)
Zeit2011-02-24 08:43:48
Autorbiikame

Log Message

Nlgp1.Parametersに各種インターフェイスを追加

Ändern Zusammenfassung

Diff

--- trunk/Nlgp1/Nlgp1/Characters/SpriteFactory.cs (revision 769)
+++ trunk/Nlgp1/Nlgp1/Characters/SpriteFactory.cs (revision 770)
@@ -79,10 +79,10 @@
7979 sprite.SpeedX = 1;
8080 sprite.Shape.Hitted += ( sender , e ) => {
8181 if( e.Direction == Direction.Right ) {
82- e.TargetShape.Sprite.SpeedX = -0.3f;
82+ e.Target.Sprite.SpeedX = -0.3f;
8383 }
8484 else if( e.Direction == Direction.Left ) {
85- e.TargetShape.Sprite.SpeedX = 0.3f;
85+ e.Target.Sprite.SpeedX = 0.3f;
8686 }
8787 };
8888 #endregion
@@ -92,7 +92,7 @@
9292 sprite.Shape.Stepped += ( sender , e ) => {
9393 bool hitsLower = false;
9494 bool hitsUpper = true;
95- foreach( SpriteShapeSteppedTarget result in e.Targets ) {
95+ foreach( SpriteShapeSteppedEventArgsContact result in e.Contacts ) {
9696 if( result.Direction == Direction.Bottom ) {
9797 if( result.Lower <= 0 ) {
9898 hitsLower = true;
@@ -102,10 +102,10 @@
102102 }
103103 }
104104 if( !hitsLower ) {
105- e.SourceShape.Sprite.SpeedX = -0.05f;
105+ e.Source.Sprite.SpeedX = -0.05f;
106106 }
107107 else if( !hitsUpper ) {
108- e.SourceShape.Sprite.SpeedX = +0.05f;
108+ e.Source.Sprite.SpeedX = +0.05f;
109109 }
110110 }
111111 };
@@ -155,7 +155,7 @@
155155 case 14:
156156 #region 10秒アイテム
157157 sprite.Shape.Hitted += ( sender ,e ) => {
158- if( e.TargetShape == PlayerStatus.Player.Sprite.Shape ) {
158+ if( e.Target == PlayerStatus.Player.Sprite.Shape ) {
159159 PlayerStatus.TimerInitialize();
160160 }
161161 };
--- trunk/Nlgp1/Nlgp1/Players/PlayerStatus.cs (revision 769)
+++ trunk/Nlgp1/Nlgp1/Players/PlayerStatus.cs (revision 770)
@@ -79,9 +79,9 @@
7979
8080 #region プレーヤー自身に対するActionイベント
8181 Player.Sprite.Shape.Hitted += ( sender , e ) => {
82- if( e.Direction == Direction.Top && e.TargetShape.Sprite.IsDestroyable ) {
82+ if( e.Direction == Direction.Top && e.Target.Sprite.IsDestroyable ) {
8383 // 上方向に移動しており、衝突したセルが破壊可能であれば、そのセルを置換します。
84- e.TargetShape.Sprite.Unload();
84+ e.Target.Sprite.Unload();
8585 }
8686 // if( Player.Attacking == AttackTypes.DivineBuster ) {
8787 // Player.RunAttack( Player.Attacking ).Start();
--- trunk/Nlgp1/Nlgp1/Parameters/SpriteShapeSteppedEventArgs.cs (revision 769)
+++ trunk/Nlgp1/Nlgp1/Parameters/SpriteShapeSteppedEventArgs.cs (revision 770)
@@ -6,26 +6,26 @@
66
77 public sealed class SpriteShapeSteppedEventArgs : EventArgs {
88
9- public SpriteShapeSteppedEventArgs( SpriteShape sourceShape , IEnumerable< SpriteShapeSteppedTarget > results ) {
10- this.SourceShape = sourceShape;
11- this.Targets = results;
9+ public SpriteShapeSteppedEventArgs( SpriteShape source , IEnumerable< SpriteShapeSteppedEventArgsContact > contacts ) {
10+ this.Source = source;
11+ this.Contacts = contacts;
1212 }
1313
14- public readonly SpriteShape SourceShape;
14+ public readonly SpriteShape Source;
1515
16- public readonly IEnumerable< SpriteShapeSteppedTarget > Targets;
16+ public readonly IEnumerable< SpriteShapeSteppedEventArgsContact > Contacts;
1717 }
1818
19- public sealed class SpriteShapeSteppedTarget {
19+ public sealed class SpriteShapeSteppedEventArgsContact {
2020
21- public SpriteShapeSteppedTarget( SpriteShape shape , Direction direction , float lower , float upper ) {
22- this.Shape = shape;
21+ public SpriteShapeSteppedEventArgsContact( SpriteShape target , Direction direction , float lower , float upper ) {
22+ this.Target = target;
2323 this.Direction = direction;
2424 this.Lower = lower;
2525 this.Upper = upper;
2626 }
2727
28- public readonly SpriteShape Shape;
28+ public readonly SpriteShape Target;
2929
3030 public readonly Direction Direction;
3131
--- trunk/Nlgp1/Nlgp1/Parameters/SpriteShapeHittedEventArgs.cs (revision 769)
+++ trunk/Nlgp1/Nlgp1/Parameters/SpriteShapeHittedEventArgs.cs (revision 770)
@@ -5,17 +5,17 @@
55
66 public sealed class SpriteShapeHittedEventArgs : EventArgs {
77
8- public SpriteShapeHittedEventArgs( SpriteShape sourceShape , SpriteShape targetShape , Direction direction , float lower , float upper ) {
9- this.SourceShape = sourceShape;
10- this.TargetShape = targetShape;
8+ public SpriteShapeHittedEventArgs( SpriteShape source , SpriteShape target , Direction direction , float lower , float upper ) {
9+ this.Source = source;
10+ this.Target = target;
1111 this.Direction = direction;
1212 this.Lower = lower;
1313 this.Upper = upper;
1414 }
1515
16- public readonly SpriteShape SourceShape;
16+ public readonly SpriteShape Source;
1717
18- public readonly SpriteShape TargetShape;
18+ public readonly SpriteShape Target;
1919
2020 public readonly Direction Direction;
2121
Show on old repository browser