Files
SlaveMatrix-SDL/SlaveMatrix/SlaveMatrix/BodyPartClasses/ハンド処理.cs
2026-06-13 22:38:57 -05:00

992 lines
30 KiB
C#

using System.Collections.Generic;
using System.Drawing;
using _2DGAMELIB;
namespace SlaveMatrix
{
public class : B
{
public bool Is乳繰り;
public bool Is乳摘み;
public bool Is乳捏ね;
public bool Is核捏ね;
public bool Isくぱぁ;
public bool Is体撫で;
public Motion ;
public Motion ;
private bool ;
private double ;
private ContactType ;
private Vector2D vs;
private List<Vector2D> vl = new List<Vector2D>();
private double u = 72.0;
private double x;
private Vector2D v;
private Vector2D o;
private int yi;
public bool ;
public bool Isモード
{
get
{
if (!Is乳繰り && !Is乳摘み && !Is乳捏ね && !Is核捏ね && !Isくぱぁ && !Is体撫で)
{
return 調UI..Is挿入;
}
return true;
}
}
public void ()
{
調UI..Enqueue(delegate(RenderArea a)
{
調UI..Sound(a, Bod..GetAreaPoint(0.01), GlobalState..GetVal(Player.V_膣, Player.V_固有値乱数), new Font("MS Gothic", 1f), Color.DeepPink.S(Player.V_膣.Clamp(0.5, 1.0)), 0.2 + 0.2 * Rng.XS.NextDouble() * Player.V_膣, b: true);
});
}
private void (ref ContactD cd)
{
Is乳繰り = true;
= cd.c;
調UI.CM.Show = true;
調UI.Set_乳首(調UI., : true);
調UI.Set_乳首(調UI., : false);
si();
}
private void ()
{
Is乳繰り = false;
調UI..Yi = 0;
調UI..Yi = 0;
}
private void si()
{
if (GlobalState.GameData.)
{
ip.SubInfoIm = GameText. + "\r\nLDo:" + GameText. + "\r\nWh:" + GameText.;
}
}
private void (ref ContactD cd)
{
調UI..Xi = 5;
調UI..Yi = 0;
調UI..Xi = 5;
調UI..Yi = 0;
Is乳摘み = true;
= cd.c;
調UI.CM.Show = true;
調UI.Set_乳首(調UI., : true);
調UI.Set_乳首(調UI., : false);
Vector2D = 調UI..;
Addvl(ref );
si();
}
private void ()
{
Is乳摘み = false;
vl.Clear();
調UI..Yi = 0;
調UI..Yi = 0;
Bod..XC = 1.0;
Bod..XC = 1.0;
調UI..C = 0.0;
調UI..C = 0.0;
if (Med.Mode == "Training")
{
//~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Element.位置B));
Med.CursorPosition = Med.FromBasePosition(.Element.B);
}
.Start();
if (調UI..Xi == 5)
{
si();
}
}
private void si()
{
if (GlobalState.GameData.)
{
ip.SubInfoIm = GameText. + "\r\nMo:" + GameText. + "\r\nLUp:" + GameText.;
}
}
private void (ref ContactD cd)
{
調UI..Xi = 2;
調UI..Yi = 0;
調UI..Xi = 2;
調UI..Yi = 0;
Is乳捏ね = true;
= cd.c;
調UI.CM.Show = true;
調UI.Set_乳房(調UI., : true);
調UI.Set_乳房(調UI., : false);
Vector2D = 調UI..;
Addvl(ref );
si2();
}
private void ()
{
Is乳捏ね = false;
vl.Clear();
調UI..Yi = 0;
調UI..Yi = 0;
Bod..XC = 1.0;
Bod..XC = 1.0;
Bod..C = 1.0;
Bod..C = 1.0;
調UI..C = 0.0;
調UI..C = 0.0;
if (Med.Mode == "Training")
{
//~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Element.位置B));
Med.CursorPosition = Med.FromBasePosition(.Element.B);
}
.Start();
if (調UI..Xi == 2)
{
si1();
}
}
private void si1()
{
if (GlobalState.GameData.)
{
ip.SubInfoIm = GameText. + "\r\nLDo:" + GameText.;
}
}
private void si2()
{
if (GlobalState.GameData.)
{
ip.SubInfoIm = GameText. + "\r\nMo:" + GameText. + "\r\nLUp:" + GameText.;
}
}
private void (ref ContactD cd)
{
調UI..Xi = 6;
調UI..Yi = 0;
Is核捏ね = true;
= cd.c;
Vector2D = Bod.;
Vector2D B = + DataConsts.Vec2DUnitY * 0.0015;
調UI..B = B;
Addvl(ref );
= true;
//~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Element.位置B));
Med.CursorPosition = Med.FromBasePosition(.Element.B);
si2();
}
private void ()
{
Is核捏ね = false;
vl.Clear();
調UI..Yi = 0;
調UI..C = 0.0;
Bod..C = DataConsts.Vec2DZero;
if (Med.Mode == "Training")
{
//~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Element.位置B));
Med.CursorPosition = Med.FromBasePosition(.Element.B);
}
}
private void si1()
{
if (GlobalState.GameData.)
{
ip.SubInfoIm = GameText. + "\r\nLDo:" + GameText.;
}
}
private void si2()
{
if (GlobalState.GameData.)
{
ip.SubInfoIm = GameText. + "\r\nMo:" + GameText. + "\r\nLUp:" + GameText.;
}
}
private void (ref ContactD cd)
{
調UI..Xi = 1;
調UI..Yi = 0;
調UI..Xi = 1;
調UI..Yi = 0;
Isくぱぁ = true;
= cd.c;
調UI.CM.Show = true;
調UI.Set_くぱぁ(調UI., : true);
調UI.Set_くぱぁ(調UI., : false);
= Bod..;
Bod.. = 1.0;
si2();
}
private void (ref ContactD cd)
{
Bod.. = ;
Isくぱぁ = false;
if (Med.Mode == "Training")
{
//~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Element.位置B));
Med.CursorPosition = Med.FromBasePosition(.Element.B);
}
if (cd.c == ContactType.Crotch)
{
si1();
}
}
private void si1()
{
if (GlobalState.GameData.)
{
ip.SubInfoIm = GameText. + "\r\nLDo:" + GameText.;
}
}
private void si2()
{
if (GlobalState.GameData.)
{
ip.SubInfoIm = GameText. + "\r\nLUp:" + GameText.;
}
}
private void (ref ContactD cd)
{
Is体撫で = true;
= cd.c;
si2();
}
private void ()
{
Is体撫で = false;
調UI..C = 0.0;
if (調UI..Xi == 3)
{
si1();
}
}
private void si1()
{
if (GlobalState.GameData.)
{
ip.SubInfoIm = "LDo:" + GameText.;
}
}
private void si2()
{
if (GlobalState.GameData.)
{
ip.SubInfoIm = "Mo:" + GameText. + "\r\nLUp:" + GameText.;
}
}
private string si()
{
if (!Isモード)
{
return (調UI...Run ? "" : ("MCl:" + GameText. + "\r\n")) + (調UI...Run ? "" : ("RCl:" + GameText.));
}
return "";
}
private void (ref Vector2D cp)
{
double num = (調UI..B - GetCenter()).Angle02π(DataConsts.Vec2DUnitY).ToDegree();
if (!double.IsNaN(num))
{
Bod..Yi = (int)((360.0 - num) / u);
Bod..Yi = Bod..Yi;
if (Bod..Yi == 1 || Bod..Yi == 2)
{
Bod..XC = 0.95 + 0.05 * Bod...Inverse();
Bod..XC = Bod..XC;
}
else
{
Bod..XC = 1.0;
Bod..XC = 1.0;
}
}
}
private void (ref Vector2D cp)
{
double num = (o.X - v.X) * 0.008;
Vector2D = Bod.;
Vector2D coord = + DataConsts.Vec2DUnitY * 0.0015;
double num2 = DataConsts.Vec2DUnitY.Angle02π(調UI..B - GetCenter());
if (!double.IsNaN(num2))
{
調UI..B = coord.TransformCoordinateBP(, num2.RotationZ());
Bod..C = (調UI..B - Bod..B) * 0.3;
}
.Element.C = (100.0 * num).Clamp(-5.0, 5.0);
}
private bool Is撫で()
{
if ( != ContactType.Head && != ContactType.Face && != ContactType.Ear && != ContactType.Hair && != ContactType.Neck && != ContactType.Shoulder && != ContactType.Side && != ContactType.Stomache && != ContactType.Thigh && != ContactType.Feet && != ContactType.Hand && != ContactType.Awareness && != ContactType.Touch && != ContactType.Tail && != ContactType.Wing && != ContactType.Fin)
{
return == ContactType.Other;
}
return true;
}
private bool Is撫で(ref ContactD cd)
{
if (cd.c != ContactType.Head && cd.c != ContactType.Face && cd.c != ContactType.Ear && cd.c != ContactType.Hair && cd.c != ContactType.Neck && cd.c != ContactType.Shoulder && cd.c != ContactType.Side && cd.c != ContactType.Stomache && cd.c != ContactType.Thigh && cd.c != ContactType.Feet && cd.c != ContactType.Hand && cd.c != ContactType.Awareness && cd.c != ContactType.Touch && cd.c != ContactType.Tail && cd.c != ContactType.Wing && cd.c != ContactType.Fin)
{
return cd.c == ContactType.Other;
}
return true;
}
private void Addvl(ref Vector2D v)
{
vl.Add(v);
if (vl.Count > 16)
{
vl.RemoveAt(0);
}
}
private Vector2D GetCenter()
{
vs = DataConsts.Vec2DZero;
foreach (Vector2D item in vl)
{
vs += item;
}
return vs / vl.Count;
}
public void Move(ref MouseButtons mb, ref Vector2D cp, ref Color hc, ref ContactD cd)
{
if (調UI.Focus != || .Run)
{
return;
}
v = cp;
x = (o.X - v.X) * 0.008;
if (Isモード)
{
if (Is乳摘み)
{
yi = Bod..Yi;
(ref cp);
調UI.Set_乳首(調UI., : true);
調UI.Set_乳首(調UI., : false);
Addvl(ref cp);
調UI..C = (100.0 * x).Clamp(-15.0, 5.0);
調UI..C = (-100.0 * x).Clamp(-5.0, 15.0);
if (yi != Bod..Yi && Bod..Yi == 1)
{
Bod. = !Bod.;
}
調UI.Action(ContactType.Milk, ActionType.Grope, CurrentState.Continue, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
}
else if (Is乳繰り)
{
調UI.Set_乳首(調UI., : true);
調UI.Set_乳首(調UI., : false);
if (cd.c != ContactType.Milk && cd.c != ContactType.Chest)
{
();
調UI.();
調UI.Action(ContactType.Milk, ActionType.Milk, CurrentState.End, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
}
}
else if (Is乳捏ね)
{
yi = Bod..Yi;
(ref cp);
調UI.Set_乳房(調UI., : true);
調UI.Set_乳房(調UI., : false);
Addvl(ref cp);
調UI..C = (100.0 * x).Clamp(-15.0, 5.0);
調UI..C = (-100.0 * x).Clamp(-5.0, 15.0);
if (yi != Bod..Yi && Bod..Yi == 1)
{
Bod. = !Bod.;
}
調UI.Action(ContactType.Chest, ActionType., CurrentState.Continue, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
}
else if (Is核捏ね)
{
if ()
{
= false;
}
else
{
(ref cp);
Addvl(ref cp);
調UI.Action(ContactType.Nucleus, ActionType., CurrentState.Continue, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
}
}
else if (Isくぱぁ)
{
調UI.Set_くぱぁ(調UI., : true);
調UI.Set_くぱぁ(調UI., : false);
}
else if (Is体撫で)
{
調UI.CM.Show = true;
調UI. = false;
調UI..Xi = 3;
調UI..Yi = 0;
if (調UI.IsHitCha(ref cd))
{
調UI.(ref cd);
.Element.C = (100.0 * x).Clamp(-45.0, 45.0);
調UI.Action(cd.c, ActionType.Contact, CurrentState.Continue, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
}
else if (調UI.)
{
調UI.Action(cd.c, ActionType.Contact, CurrentState.Continue, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
.Element.C = 0.0;
調UI.();
}
si2();
}
else
{
調UI..Move(ref mb, ref cp, ref hc, ref cd);
}
}
else if (cd.c == ContactType.Milk)
{
調UI.CM.Show = cd.e.;
調UI. = !cd.e.;
if (調UI.)
{
調UI..B = cp;
}
調UI..Xi = 5;
調UI..Yi = 0;
調UI..Xi = 5;
調UI..Yi = 0;
調UI.Set_乳首(調UI., : true);
調UI.Set_乳首(調UI., : false);
si();
}
else if (cd.c == ContactType.Chest)
{
調UI.CM.Show = cd.e.;
調UI. = !cd.e.;
if (調UI.)
{
調UI..B = cp;
}
調UI..Xi = 2;
調UI..Yi = 0;
調UI..Xi = 2;
調UI..Yi = 0;
si1();
}
else if (cd.c == ContactType.Nucleus)
{
調UI.CM.Show = true;
調UI. = false;
調UI..Xi = 6;
調UI..Yi = 0;
調UI.Set_陰核(調UI.);
si1();
}
else if ((Player.1 && cd.c == ContactType.Mouth && !調UI.Is口挿入) || (cd.c == ContactType.Vagina && !調UI.Is膣挿入) || (cd.c == ContactType.Anal && !調UI.Is肛挿入) || (cd.c == ContactType.Thread && !調UI.Is糸挿入))
{
調UI.CM.Show = true;
調UI. = false;
switch (cd.c)
{
case ContactType.Mouth:
if (Player.)
{
調UI..Xi = 8;
}
else
{
調UI..Xi = 7;
}
break;
case ContactType.Vagina:
if (Player.)
{
調UI..Xi = 8;
}
else
{
調UI..Xi = 7;
}
break;
case ContactType.Anal:
if (Player.)
{
調UI..Xi = 8;
}
else
{
調UI..Xi = 7;
}
break;
case ContactType.Thread:
if (Player.)
{
調UI..Xi = 8;
}
else
{
調UI..Xi = 7;
}
break;
}
調UI..Yi = 0;
調UI..Move(ref mb, ref cp, ref hc, ref cd);
}
else if (cd.c == ContactType.Crotch)
{
si1();
}
else if (Is撫で(ref cd))
{
調UI.CM.Show = true;
調UI. = false;
調UI..Xi = 3;
調UI..Yi = 0;
si1();
}
else if (調UI.CM.Element.Xi == 2 || 調UI.CM.Element.Xi == 3 || 調UI.CM.Element.Xi == 5 || 調UI.CM.Element.Xi == 6 || 調UI.CM.Element.Xi == 7 || 調UI.CM.Element.Xi == 8 || 調UI.CM.Element.Xi == 10)
{
調UI. = false;
調UI.CM.Show = true;
if (cd.e == null)
{
調UI..Xi = 0;
}
調UI..Yi = 0;
調UI..Xi = 0;
調UI..Yi = 0;
();
if (GlobalState.GameData.)
{
ip.SubInfoIm = si();
}
}
o = v;
}
public void Down(ref MouseButtons mb, ref Vector2D cp, ref Color hc, ref ContactD cd)
{
if (調UI.Focus != )
{
return;
}
if (mb == MouseButtons.Left)
{
if (cd.c == ContactType.Milk && ((!cd.e. && !調UI..) || (cd.e. && !調UI..)))
{
調UI.(ref cd);
(ref cd);
(ref cp);
調UI.Action(ContactType.Milk, ActionType.Grope, CurrentState.Start, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
調UI.();
調UI.();
調UI.();
}
else if (cd.c == ContactType.Chest)
{
調UI.(ref cd);
(ref cd);
(ref cp);
調UI.Action(ContactType.Chest, ActionType., CurrentState.Start, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
調UI.();
調UI.();
調UI.();
}
else if (cd.c == ContactType.Nucleus && !調UI..)
{
調UI.(ref cd);
(ref cd);
(ref cp);
調UI.Action(ContactType.Nucleus, ActionType., CurrentState.Start, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
調UI.();
調UI.();
調UI.();
}
else if (cd.c == ContactType.Crotch && !Isモード)
{
調UI.(ref cd);
(ref cd);
調UI.Action(ContactType.Crotch, ActionType., CurrentState.Start, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
();
if (Rng.XS.NextBool())
{
調UI.();
}
else
{
調UI.();
}
.Start();
調UI.();
}
else if (!調UI..Is挿入 && Is撫で(ref cd))
{
調UI.(ref cd);
(ref cd);
調UI.Action(cd.c, ActionType.Contact, CurrentState.Start, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
調UI.();
}
else
{
= cd.c;
調UI..Down(ref mb, ref cp, ref hc, ref cd);
}
}
else if (mb == MouseButtons.Right)
{
if (!Isモード && !調UI..Is挿入)
{
調UI. = false;
調UI.CM.Show = true;
調UI..Xi = 0;
調UI..Yi = 0;
調UI..Xi = 0;
調UI..Yi = 0;
();
if ()
{
= false;
return;
}
調UI.Focus.Element.Intensity = 0.5;
調UI.Focus = 調UI.CM;
調UI.CM.Element.B = cp;
調UI.. = true;
調UI..Move(ref mb, ref cp, ref hc, ref cd);
}
}
else if (mb == MouseButtons.Middle && !Isモード && !調UI..Is挿入 && (!調UI.CM.Show || 調UI..Xi != 5 || !調UI..) && (!調UI. || 調UI..Xi != 5 || !調UI..) && (!調UI.CM.Show || 調UI..Xi != 5 || !調UI..))
{
調UI. = false;
調UI.CM.Show = true;
調UI..Xi = 0;
調UI..Yi = 0;
調UI..Xi = 0;
調UI..Yi = 0;
();
if ()
{
= false;
return;
}
調UI.Focus.Element.Intensity = 0.5;
調UI.Focus = 調UI.CM;
調UI.CM.Element.B = cp;
調UI..Move(ref mb, ref cp, ref hc, ref cd);
}
}
public void Up(ref MouseButtons mb, ref Vector2D cp, ref Color hc, ref ContactD cd)
{
if (調UI.Focus != || mb != MouseButtons.Left || !Isモード)
{
return;
}
if ( == ContactType.Milk)
{
if (Is乳摘み)
{
調UI.Action(ContactType.Milk, ActionType.Grope, CurrentState.End, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
}
if (Is乳繰り)
{
調UI.Action(ContactType.Milk, ActionType.Milk, CurrentState.End, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
}
();
();
調UI. = true;
調UI.();
}
else if ( == ContactType.Chest)
{
調UI.Action(ContactType.Chest, ActionType., CurrentState.End, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
();
調UI. = true;
調UI.();
}
else if ( == ContactType.Nucleus)
{
調UI.Action(ContactType.Nucleus, ActionType., CurrentState.End, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
();
調UI.();
}
else if ( == ContactType.Crotch)
{
.End();
調UI.Action(ContactType.Crotch, ActionType., CurrentState.End, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
(ref cd);
調UI. = true;
調UI.();
}
else if (Is撫で())
{
調UI.Action(cd.c, ActionType.Contact, CurrentState.End, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
();
調UI.();
if (GlobalState.GameData.)
{
if (調UI.IsHitCha(ref cd))
{
si1();
}
else
{
ip.SubInfoIm = si();
}
}
}
else
{
調UI..Up(ref mb, ref cp, ref hc, ref cd);
}
}
public void Leave(ref MouseButtons mb, ref Vector2D cp, ref Color hc)
{
}
public void Wheel(ref MouseButtons mb, ref Vector2D cp, ref int dt, ref Color hc, ref ContactD cd)
{
if (調UI.Focus == && (cd.c == ContactType.Milk || cd.c == ContactType.Chest) && !Is乳摘み && (調UI..Xi == 5 || 調UI..Xi == 5))
{
if (!Is乳繰り)
{
調UI.Action(ContactType.Milk, ActionType.Milk, CurrentState.Start, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
}
else
{
調UI.Action(ContactType.Milk, ActionType.Milk, CurrentState.Continue, ToolType.Hand, 0, 1, : false, : false);
Player.();
Player.();
}
調UI.Set_乳首(調UI., : true);
調UI.Set_乳首(調UI., : false);
調UI.(ref cd);
(ref cd);
調UI..Yi = (調UI..Yi + dt.Sign() * 2).Clamp(0, 調UI..Body.GetCountY());
調UI..Yi = (調UI..Yi - dt.Sign() * 2).Clamp(0, 調UI..Body.GetCountY());
si();
調UI.();
}
}
public (TrainingUI 調UI, CharacterElement )
: base(調UI, )
{
2 = this;
double d = 1.0;
bool f = false;
= new Motion(0.0, 1.0)
{
BaseSpeed = 1.0,
OnStart = delegate
{
f = 2.Bod..Yi <= 2;
d = 2.Bod..Yv;
},
OnUpdate = delegate(Motion m)
{
if (f)
{
d -= m.Value;
if (d < 0.0)
{
d = 0.0;
}
2.Bod..Yv = d;
2.Bod..Yv = d;
if (2.Bod..Yi == 0)
{
d = 0.0;
m.End();
}
}
else
{
d += m.Value;
if (d > 1.0)
{
d = 0.0;
}
2.Bod..Yv = d;
2.Bod..Yv = d;
if (2.Bod..Yi == 0)
{
d = 0.0;
m.End();
}
}
},
OnReach = delegate(Motion m)
{
m.End();
},
OnLoop = delegate
{
},
OnEnd = delegate(Motion m)
{
m.ResetValue();
2.Bod..Yi = 0;
2.Bod..Yi = 0;
}
};
調UI.Mots.Add(.GetHashCode().ToString(), );
= new Motion(0.0, 1.0)
{
BaseSpeed = 1.0,
OnStart = delegate
{
},
OnUpdate = delegate
{
調UI.Action(ContactType.Crotch, ActionType., CurrentState.Continue, ToolType.Hand, 0, 1, : false, : false);
Player.();
},
OnReach = delegate
{
},
OnLoop = delegate
{
},
OnEnd = delegate(Motion m)
{
m.ResetValue();
}
};
調UI.Mots.Add(.GetHashCode().ToString(), );
}
public void SetCha(Character Cha)
{
base.Cha = Cha;
Bod = Cha.Body;
}
public new void Reset()
{
base.Reset();
Is乳繰り = false;
Is乳摘み = false;
Is乳捏ね = false;
Is核捏ね = false;
Isくぱぁ = false;
Is体撫で = false;
?.End();
?.End();
();
();
();
= false;
();
ContactD cd = default(ContactD);
(ref cd);
();
= ContactType.none;
vs = default(Vector2D);
vl.Clear();
x = 0.0;
v = default(Vector2D);
o = default(Vector2D);
yi = 0;
= false;
}
}
}