Nlgp1.B2DX.Boxの実装を修正
@@ -11,7 +11,6 @@ | ||
11 | 11 | { |
12 | 12 | |
13 | 13 | |
14 | - float rest = 0.6f, dens = 0, fric = 0.3f; | |
15 | 14 | delegate void func(); |
16 | 15 | public StaticBox(Vec2 pos, float angle, World world, float boxwidth, float boxheight, bool noRotateFlag, Dictionary<UserDataKind, string> userdata) |
17 | 16 | : base(pos, angle, world, boxwidth, boxheight, noRotateFlag, userdata, new Dictionary<ObjectDataKind, float> {{ObjectDataKind.Density,0 }}) |
@@ -19,8 +19,8 @@ | ||
19 | 19 | public float Boxheight; |
20 | 20 | public bool NoRotateFlag; |
21 | 21 | public myUserData UserData=new myUserData(); |
22 | - float rest = 0.6f, dens = 0.1f, fric = 0.3f; | |
23 | - float angularDamping = 5, lineardamping = 0.5f; | |
22 | + protected const float rest = 0.6f, dens = 0.1f, fric = 0.3f; | |
23 | + protected const float angularDamping = 5, lineardamping = 0.5f; | |
24 | 24 | Dictionary<ObjectDataKind, float> Objdata=new Dictionary<ObjectDataKind,float>(); |
25 | 25 | |
26 | 26 | //public Box(Vec2 pos, float angle, World world, float boxwidth, float boxheight, bool noRotateFlag, Dictionary<UserDataKind, string> userdata,Dictionary<ObjectDataKind,float> data) |
@@ -46,7 +46,7 @@ | ||
46 | 46 | if (data.ContainsKey(ObjectDataKind.Density)) p.Density = data[ObjectDataKind.Density]; |
47 | 47 | p.Filter = fil; |
48 | 48 | } |
49 | - PolygonDef makeshape(float boxwidth, float boxheight) | |
49 | + static PolygonDef makeshape(float boxwidth, float boxheight) | |
50 | 50 | { |
51 | 51 | PolygonDef p = new PolygonDef(); |
52 | 52 | p.SetAsBox(boxwidth, boxheight); |