diff --git a/2DGAMELIB/_2DGAMELIB/Difs.cs b/2DGAMELIB/_2DGAMELIB/Difs.cs index f411c24..9b8cafa 100644 --- a/2DGAMELIB/_2DGAMELIB/Difs.cs +++ b/2DGAMELIB/_2DGAMELIB/Difs.cs @@ -305,7 +305,7 @@ namespace _2DGAMELIB foreach (ShapePart p0 in array2) { Vector2D p = p0.Position; - if (array.All((ShapePart p1) => p0 == p1 || p1.JP.All((Joi j) => !(p1.ToGlobal(j.Joint).DistanceSquared(p) <= Join.IdentityDistance)))) + if (array.All((ShapePart p1) => p0 == p1 || p1.JP.All((JointPoint j) => !(p1.ToGlobal(j.Joint).DistanceSquared(p) <= Join.IdentityDistance)))) { return p0; } diff --git a/2DGAMELIB/_2DGAMELIB/Join.cs b/2DGAMELIB/_2DGAMELIB/Join.cs index e15bbc5..151f2ec 100644 --- a/2DGAMELIB/_2DGAMELIB/Join.cs +++ b/2DGAMELIB/_2DGAMELIB/Join.cs @@ -14,7 +14,7 @@ namespace _2DGAMELIB int num = 0; List list = new List(); List list2 = EnumPar.ToList(); - foreach (Joi item in JoinRoot.JP) + foreach (JointPoint item in JoinRoot.JP) { Vector2D v = JoinRoot.ToGlobal(item.Joint); int num2 = 0; @@ -59,7 +59,7 @@ namespace _2DGAMELIB { ShapePart shapePart = js.Joins[i].Par1; int num3 = 0; - foreach (Joi item in shapePart.JP) + foreach (JointPoint item in shapePart.JP) { Vector2D v = shapePart.ToGlobal(item.Joint); int num4 = 0; @@ -108,7 +108,7 @@ namespace _2DGAMELIB if (JoinRoot != item2) { int num2 = 0; - foreach (Joi item3 in item.JP) + foreach (JointPoint item3 in item.JP) { Vector2D v = item.ToGlobal(item3.Joint); foreach (ShapePart item4 in item2.EnumJoinRoot) @@ -160,7 +160,7 @@ namespace _2DGAMELIB if (difs != item2) { int num4 = 0; - foreach (Joi item3 in item.JP) + foreach (JointPoint item3 in item.JP) { Vector2D v = item.ToGlobal(item3.Joint); foreach (ShapePart item4 in item2.EnumJoinRoot) diff --git a/2DGAMELIB/_2DGAMELIB/Joi.cs b/2DGAMELIB/_2DGAMELIB/JointPoint.cs similarity index 61% rename from 2DGAMELIB/_2DGAMELIB/Joi.cs rename to 2DGAMELIB/_2DGAMELIB/JointPoint.cs index 8f88ecb..9ad50e3 100644 --- a/2DGAMELIB/_2DGAMELIB/Joi.cs +++ b/2DGAMELIB/_2DGAMELIB/JointPoint.cs @@ -6,16 +6,16 @@ namespace _2DGAMELIB //its the position of a joint [Serializable] - public class Joi + public class JointPoint { public Vector2D Joint = DataConsts.Vec2DZero; - public Joi(Joi Joi) + public JointPoint(JointPoint JointPoint) { - Joint = Joi.Joint; + Joint = JointPoint.Joint; } - public Joi(Vector2D Joint) + public JointPoint(Vector2D Joint) { this.Joint = Joint; } diff --git a/2DGAMELIB/_2DGAMELIB/Obj.cs b/2DGAMELIB/_2DGAMELIB/Obj.cs index ea994a1..9180a52 100644 --- a/2DGAMELIB/_2DGAMELIB/Obj.cs +++ b/2DGAMELIB/_2DGAMELIB/Obj.cs @@ -228,7 +228,7 @@ namespace _2DGAMELIB if (difs.EnumJoinRoot.All(delegate(ShapePart p0) { p = p0.Position; - return pa.All((ShapePart p1) => p0 == p1 || p1.JP.All((Joi j) => !(p1.ToGlobal(j.Joint).DistanceSquared(p) <= Join.IdentityDistance))); + return pa.All((ShapePart p1) => p0 == p1 || p1.JP.All((JointPoint j) => !(p1.ToGlobal(j.Joint).DistanceSquared(p) <= Join.IdentityDistance))); })) { return difs; diff --git a/2DGAMELIB/_2DGAMELIB/Ser.cs b/2DGAMELIB/_2DGAMELIB/Ser.cs index c44ad9b..49fd6eb 100644 --- a/2DGAMELIB/_2DGAMELIB/Ser.cs +++ b/2DGAMELIB/_2DGAMELIB/Ser.cs @@ -18,7 +18,8 @@ namespace _2DGAMELIB .Add("_2DGAMELIB.Par", typeof(ShapePart)) .Add("_2DGAMELIB.ParT", typeof(ShapePartT)) .Add("_2DGAMELIB.Pars", typeof(PartGroup)) - .Add("_2DGAMELIB.Out", typeof(CurveOutline)); + .Add("_2DGAMELIB.Out", typeof(CurveOutline)) + .Add("_2DGAMELIB.Joi", typeof(JointPoint)); private static BinaryFormatter NewFormatter() { diff --git a/2DGAMELIB/_2DGAMELIB/ShapePart.cs b/2DGAMELIB/_2DGAMELIB/ShapePart.cs index babcca2..d71bdca 100644 --- a/2DGAMELIB/_2DGAMELIB/ShapePart.cs +++ b/2DGAMELIB/_2DGAMELIB/ShapePart.cs @@ -31,7 +31,7 @@ namespace _2DGAMELIB protected List op = new List(); - protected List jp = new List(); + protected List jp = new List(); protected Vector2D basePointBase = DataConsts.Vec2DZero; @@ -176,7 +176,7 @@ namespace _2DGAMELIB } } - public List JP + public List JP { get { @@ -188,7 +188,7 @@ namespace _2DGAMELIB } } - public IEnumerable InitializeJP + public IEnumerable InitializeJP { set { @@ -588,10 +588,10 @@ namespace _2DGAMELIB { op.Add(new CurveOutline(ShapePart.op[i])); } - jp = new List(ShapePart.jp.Count); + jp = new List(ShapePart.jp.Count); for (int j = 0; j < ShapePart.jp.Count; j++) { - jp.Add(new Joi(ShapePart.jp[j])); + jp.Add(new JointPoint(ShapePart.jp[j])); } basePointBase = ShapePart.basePointBase; basePointCont = ShapePart.basePointCont; diff --git a/2DGAMELIB/_2DGAMELIB/Shas.cs b/2DGAMELIB/_2DGAMELIB/Shas.cs index 1be424b..d74b5c5 100644 --- a/2DGAMELIB/_2DGAMELIB/Shas.cs +++ b/2DGAMELIB/_2DGAMELIB/Shas.cs @@ -69,11 +69,11 @@ namespace _2DGAMELIB return vec2DZero / num; } - public static Vector2D GetCenter(this IEnumerable Joi) + public static Vector2D GetCenter(this IEnumerable Joi) { double num = 0.0; Vector2D vec2DZero = DataConsts.Vec2DZero; - foreach (Joi item in Joi) + foreach (JointPoint item in Joi) { vec2DZero += item.Joint; num += 1.0; @@ -200,60 +200,60 @@ namespace _2DGAMELIB } } - public static void ScalingX(this IEnumerable Joi, Vector2D BP, double Rate) + public static void ScalingX(this IEnumerable Joi, Vector2D BP, double Rate) { double num = BP.X - BP.X * Rate; - foreach (Joi item in Joi) + foreach (JointPoint item in Joi) { item.Joint.X = item.Joint.X * Rate + num; } } - public static void ScalingX(this IEnumerable Joi, ref Vector2D BP, double Rate) + public static void ScalingX(this IEnumerable Joi, ref Vector2D BP, double Rate) { double num = BP.X - BP.X * Rate; - foreach (Joi item in Joi) + foreach (JointPoint item in Joi) { item.Joint.X = item.Joint.X * Rate + num; } } - public static void ScalingY(this IEnumerable Joi, Vector2D BP, double Rate) + public static void ScalingY(this IEnumerable Joi, Vector2D BP, double Rate) { double num = BP.Y - BP.Y * Rate; - foreach (Joi item in Joi) + foreach (JointPoint item in Joi) { item.Joint.Y = item.Joint.Y * Rate + num; } } - public static void ScalingY(this IEnumerable Joi, ref Vector2D BP, double Rate) + public static void ScalingY(this IEnumerable Joi, ref Vector2D BP, double Rate) { double num = BP.Y - BP.Y * Rate; - foreach (Joi item in Joi) + foreach (JointPoint item in Joi) { item.Joint.Y = item.Joint.Y * Rate + num; } } - public static void ScalingXY(this IEnumerable Joi, Vector2D BP, double Rate) + public static void ScalingXY(this IEnumerable Joi, Vector2D BP, double Rate) { Vector2D vector2D = default(Vector2D); vector2D.X = BP.X - BP.X * Rate; vector2D.Y = BP.Y - BP.Y * Rate; - foreach (Joi item in Joi) + foreach (JointPoint item in Joi) { item.Joint.X = item.Joint.X * Rate + vector2D.X; item.Joint.Y = item.Joint.Y * Rate + vector2D.Y; } } - public static void ScalingXY(this IEnumerable Joi, ref Vector2D BP, double Rate) + public static void ScalingXY(this IEnumerable Joi, ref Vector2D BP, double Rate) { Vector2D vector2D = default(Vector2D); vector2D.X = BP.X - BP.X * Rate; vector2D.Y = BP.Y - BP.Y * Rate; - foreach (Joi item in Joi) + foreach (JointPoint item in Joi) { item.Joint.X = item.Joint.X * Rate + vector2D.X; item.Joint.Y = item.Joint.Y * Rate + vector2D.Y; @@ -308,19 +308,19 @@ namespace _2DGAMELIB Out.Reverse(); } - public static void ReverseX(this List Joi, ref Vector2D BP) + public static void ReverseX(this List Joi, ref Vector2D BP) { double num = BP.X - (1.0 - BP.X); - foreach (Joi item in Joi) + foreach (JointPoint item in Joi) { item.Joint.X = 1.0 - item.Joint.X + num; } } - public static void ReverseY(this List Joi, ref Vector2D BP) + public static void ReverseY(this List Joi, ref Vector2D BP) { double num = BP.Y - (1.0 - BP.Y); - foreach (Joi item in Joi) + foreach (JointPoint item in Joi) { item.Joint.Y = 1.0 - item.Joint.Y + num; } @@ -400,9 +400,9 @@ namespace _2DGAMELIB } } - public static void ExpansionX(this List Joi, ref Vector2D BP, double Rate) + public static void ExpansionX(this List Joi, ref Vector2D BP, double Rate) { - foreach (Joi item in Joi) + foreach (JointPoint item in Joi) { Vector2D vector2D = (item.Joint - BP).newNormalize(); vector2D.Y = 0.0; @@ -410,9 +410,9 @@ namespace _2DGAMELIB } } - public static void ExpansionY(this List Joi, ref Vector2D BP, double Rate) + public static void ExpansionY(this List Joi, ref Vector2D BP, double Rate) { - foreach (Joi item in Joi) + foreach (JointPoint item in Joi) { Vector2D vector2D = (item.Joint - BP).newNormalize(); vector2D.X = 0.0; @@ -420,17 +420,17 @@ namespace _2DGAMELIB } } - public static void ExpansionXY(this List Joi, Vector2D BP, double Rate) + public static void ExpansionXY(this List Joi, Vector2D BP, double Rate) { - foreach (Joi item in Joi) + foreach (JointPoint item in Joi) { item.Joint += (item.Joint - BP).newNormalize() * Rate; } } - public static void ExpansionXY(this List Joi, ref Vector2D BP, double Rate) + public static void ExpansionXY(this List Joi, ref Vector2D BP, double Rate) { - foreach (Joi item in Joi) + foreach (JointPoint item in Joi) { item.Joint += (item.Joint - BP).newNormalize() * Rate; } diff --git a/SlaveMatrix/SlaveMatrix/BodyPartClasses/InfoPanel.cs b/SlaveMatrix/SlaveMatrix/BodyPartClasses/InfoPanel.cs index 2303996..d843140 100644 --- a/SlaveMatrix/SlaveMatrix/BodyPartClasses/InfoPanel.cs +++ b/SlaveMatrix/SlaveMatrix/BodyPartClasses/InfoPanel.cs @@ -161,7 +161,7 @@ namespace SlaveMatrix MaiB.Closed = true; MaiB.BrushColor = Color.FromArgb(160, Col.Black); MaiB.Hit = false; - MaiB.JP.Add(new Joi(MaiB.OP.GetCenter())); + MaiB.JP.Add(new JointPoint(MaiB.OP.GetCenter())); Mai = new Tex("Tex1", vector2D, num2, num3 * 0.98, num4 * 0.91, new Font("MS Gothic", 1f), 0.08, 0, " ", Col.White, Col.Black, Color.Transparent, 19.0, Col.White, delegate(Tex sp) { sp.Text = sp.Text; @@ -180,7 +180,7 @@ namespace SlaveMatrix Mai2B.Closed = true; Mai2B.BrushColor = Color.FromArgb(160, Col.Black); Mai2B.Hit = false; - Mai2B.JP.Add(new Joi(Mai2B.OP.GetCenter())); + Mai2B.JP.Add(new JointPoint(Mai2B.OP.GetCenter())); Mai2 = new Tex("Tex3", vector2D, num2, num3 * 0.98, num5 * 0.97, new Font("MS Gothic", 1f), 0.08, 0, " ", Col.White, Col.Black, Color.Transparent, 19.0, Col.White, delegate(Tex sp) { sp.Text = sp.Text; @@ -200,7 +200,7 @@ namespace SlaveMatrix SubB.Closed = true; SubB.BrushColor = Color.FromArgb(160, Col.Black); SubB.Hit = false; - SubB.JP.Add(new Joi(SubB.OP.GetCenter())); + SubB.JP.Add(new JointPoint(SubB.OP.GetCenter())); Sub = new Tex("Tex4", vector2D, num2 * 1.01, num3 * 0.98, num4 * 0.91, new Font("MS Gothic", 1f), 0.07, 0, " ", Col.White, Col.Black, Color.Transparent, 15.0); Sub.ShapePartT.BasePointBase = Sub.ShapePartT.OP.GetCenter().MulY(y); Sub.Position = SubB.ToGlobal(SubB.JP[0].Joint); @@ -216,7 +216,7 @@ namespace SlaveMatrix Sub2B.Closed = true; Sub2B.BrushColor = Color.FromArgb(160, Col.Black); Sub2B.Hit = false; - Sub2B.JP.Add(new Joi(SubB.OP.GetCenter())); + Sub2B.JP.Add(new JointPoint(SubB.OP.GetCenter())); Sub2 = new Tex("Tex3", Sub2B.PositionBase, num2 * 1.01, num3 * 0.98, num4 * 0.91, new Font("MS Gothic", 1f), 0.07, 0, "", Col.White, Col.Black, Color.Transparent, 15.0); Sub2.ShapePartT.BasePointBase = Sub2.ShapePartT.OP.GetCenter().MulY(y); Sub2.Position = Sub2B.ToGlobal(Sub2B.JP[0].Joint); diff --git a/SlaveMatrix/SlaveMatrix/BodyPartClasses/拘束鎖.cs b/SlaveMatrix/SlaveMatrix/BodyPartClasses/拘束鎖.cs index d862ad7..fe4bc25 100644 --- a/SlaveMatrix/SlaveMatrix/BodyPartClasses/拘束鎖.cs +++ b/SlaveMatrix/SlaveMatrix/BodyPartClasses/拘束鎖.cs @@ -306,7 +306,7 @@ namespace SlaveMatrix num++; } } - shapePart.JP[0] = new Joi(vec2DZero / num); + shapePart.JP[0] = new JointPoint(vec2DZero / num); 接続P(); 尺度B = (shapePart.GetArea() / X0Y0_鎖1.GetArea()).Sqrt() * 1.2; } diff --git a/SlaveMatrix/SlaveMatrix/GameClasses/Body.cs b/SlaveMatrix/SlaveMatrix/GameClasses/Body.cs index edc1fa6..4eab8df 100644 --- a/SlaveMatrix/SlaveMatrix/GameClasses/Body.cs +++ b/SlaveMatrix/SlaveMatrix/GameClasses/Body.cs @@ -5265,9 +5265,9 @@ namespace SlaveMatrix } if (IsSingleEye) { - 頭.X0Y0_Head.JP[7] = new Joi(頭.X0Y0_Head.JP[7].Joint.MulY(0.96)); - 頭.X0Y0_Head.JP[17] = new Joi(頭.X0Y0_Head.JP[17].Joint.MulY(0.96)); - 頭.X0Y0_Head.JP[18] = new Joi(頭.X0Y0_Head.JP[18].Joint.MulY(0.96)); + 頭.X0Y0_Head.JP[7] = new JointPoint(頭.X0Y0_Head.JP[7].Joint.MulY(0.96)); + 頭.X0Y0_Head.JP[17] = new JointPoint(頭.X0Y0_Head.JP[17].Joint.MulY(0.96)); + 頭.X0Y0_Head.JP[18] = new JointPoint(頭.X0Y0_Head.JP[18].Joint.MulY(0.96)); 紅潮.紅潮1_表示 = false; 紅潮.X0Y0_紅潮左.AngleBase = 20.0; 紅潮.X0Y0_紅潮弱左.AngleBase = 20.0;