• R/O
  • SSH
  • HTTPS

nlgp1: Commit


Commit MetaInfo

Revision835 (tree)
Zeit2011-03-02 07:25:51
Autorbiikame

Log Message

ISpriteShapeに円を追加

Ändern Zusammenfassung

Diff

--- trunk/Nlgp1/Nlgp1/Sprites/Sprite.cs (revision 834)
+++ trunk/Nlgp1/Nlgp1/Sprites/Sprite.cs (revision 835)
@@ -130,7 +130,7 @@
130130 /// <summary>
131131 /// スプライトの位置、サイズを取得または、設定します。
132132 /// </summary>
133- public ISpriteShape Shape {
133+ public IPolygonSpriteShape Shape {
134134 get;
135135 private set;
136136 }
--- trunk/Nlgp1/Nlgp1/Parameters/CircleSpriteShapeSteppedEventArgs.cs (nonexistent)
+++ trunk/Nlgp1/Nlgp1/Parameters/CircleSpriteShapeSteppedEventArgs.cs (revision 835)
@@ -0,0 +1,16 @@
1+using System;
2+using Box2DX.Collision;
3+
4+namespace Nlgp1.Parameters
5+{
6+ public sealed class CircleSpriteShapeSteppedEventArgs : EventArgs
7+ {
8+
9+ public CircleSpriteShapeSteppedEventArgs(ICircleSpriteShape shape)
10+ {
11+ this.Shape = shape;
12+ }
13+
14+ public readonly ICircleSpriteShape Shape;
15+ }
16+}
--- trunk/Nlgp1/Nlgp1/Parameters/ICircleSpriteContact.cs (revision 834)
+++ trunk/Nlgp1/Nlgp1/Parameters/ICircleSpriteContact.cs (revision 835)
@@ -11,7 +11,7 @@
1111 /// <summary>
1212 /// 衝突位置
1313 /// </summary>
14- Vec2 Position { get; }
14+ Vector Position { get; }
1515
1616 /// <summary>
1717 /// 衝突角
--- trunk/Nlgp1/Nlgp1/Parameters/ICircleSpriteShape.cs (revision 834)
+++ trunk/Nlgp1/Nlgp1/Parameters/ICircleSpriteShape.cs (revision 835)
@@ -1,4 +1,5 @@
11 using System;
2+using System.Collections.Generic;
23 using Nlgp1.Utilities;
34
45 namespace Nlgp1.Parameters
@@ -9,6 +10,16 @@
910 public interface ICircleSpriteShape : ISpriteShape
1011 {
1112 /// <summary>
13+ /// IStageWorld.Step後に実行されるイベント
14+ /// </summary>
15+ event EventHandler<CircleSpriteShapeSteppedEventArgs> Stepped;
16+
17+ /// <summary>
18+ /// 衝突結果
19+ /// </summary>
20+ IEnumerable<ICircleSpriteContact> Contacts { get; }
21+
22+ /// <summary>
1223 /// 範囲
1324 /// </summary>
1425 Circle Area { get; }
--- trunk/Nlgp1/Nlgp1/Parameters/ISpriteShape.cs (revision 834)
+++ trunk/Nlgp1/Nlgp1/Parameters/ISpriteShape.cs (revision 835)
@@ -19,15 +19,5 @@
1919 /// 衝突フィルター
2020 /// </summary>
2121 SpriteShapeFilter Filter { get; }
22-
23- /// <summary>
24- /// 衝突結果
25- /// </summary>
26- IEnumerable<ISpriteContact> Contacts { get; }
27-
28- /// <summary>
29- /// IStageWorld.Step後に実行されるイベント
30- /// </summary>
31- event EventHandler<SpriteShapeSteppedEventArgs> Stepped;
3222 }
3323 }
--- trunk/Nlgp1/Nlgp1/Parameters/PolygonSpriteShapeSteppedEventArgs.cs (nonexistent)
+++ trunk/Nlgp1/Nlgp1/Parameters/PolygonSpriteShapeSteppedEventArgs.cs (revision 835)
@@ -0,0 +1,16 @@
1+using System;
2+using Box2DX.Collision;
3+
4+namespace Nlgp1.Parameters
5+{
6+ public sealed class PolygonSpriteShapeSteppedEventArgs : EventArgs
7+ {
8+
9+ public PolygonSpriteShapeSteppedEventArgs(IPolygonSpriteShape shape)
10+ {
11+ this.Shape = shape;
12+ }
13+
14+ public readonly IPolygonSpriteShape Shape;
15+ }
16+}
--- trunk/Nlgp1/Nlgp1/Parameters/IPolygonSpriteShape.cs (revision 834)
+++ trunk/Nlgp1/Nlgp1/Parameters/IPolygonSpriteShape.cs (revision 835)
@@ -10,6 +10,16 @@
1010 public interface IPolygonSpriteShape : ISpriteShape
1111 {
1212 /// <summary>
13+ /// IStageWorld.Step後に実行されるイベント
14+ /// </summary>
15+ event EventHandler<PolygonSpriteShapeSteppedEventArgs> Stepped;
16+
17+ /// <summary>
18+ /// 衝突結果
19+ /// </summary>
20+ IEnumerable<IPolygonSpriteContact> Contacts { get; }
21+
22+ /// <summary>
1323 /// 衝突範囲
1424 /// </summary>
1525 IEnumerable<Vector> Area { get; }
Show on old repository browser