Files
SlaveMatrix-SDL/SlaveMatrix/SlaveMatrix/BodyPartClasses/挿入処理.cs

1811 lines
54 KiB
C#

using System.ComponentModel;
using System.Drawing;
using System.Linq;
using _2DGAMELIB;
namespace SlaveMatrix
{
public class : B
{
public const bool = true;
public ConstProp CP挿入 = new ConstProp();
public ConstProp CP振動 = new ConstProp();
private const double mi = 0.35;
private ContactType ;
private double ;
private static int P断面人最大i;
private static int A断面人最大i;
private static int P断面獣最大i;
private static int A断面獣最大i;
private static double v;
private static double A通常人最大v;
private static double P通常人最大v;
private static double A通常獣最大v;
private static double P通常獣最大v;
private static double v;
private static double v2;
private static double v3;
public bool Is押付;
public bool Is挿入;
public bool ;
public bool ;
private bool ;
private Motion ;
private Motion ;
public Motion ;
public double = 1.0;
public double = 1.0;
public double = 1.0;
public double = 1.0;
public Motion ;
public bool ;
private double dv;
private int dy;
private Vector2D vr;
private Vector2D or;
private double xr;
private double yr;
private double a;
private double y0;
private ShapePart p0;
private ShapePart py;
private Vector2D bp;
private int psi;
private bool pn;
private double oi;
private ContactD cd;
private Vector2D v;
private Vector2D o;
private double x;
private double y;
public bool Is口 => == ContactType.Mouth;
public bool Is膣 => == ContactType.Vagina;
public bool Is肛 => == ContactType.Anal;
public bool Is糸 => == ContactType.Thread;
public bool Isモード
{
get
{
if (!Is押付)
{
return Is挿入;
}
return true;
}
}
public bool
{
get
{
if ()
{
return .Run;
}
return false;
}
set
{
if ()
{
if (value)
{
.Start();
}
else
{
.End();
}
}
}
}
public bool
{
get
{
if ()
{
return .Run;
}
return false;
}
set
{
if ()
{
if (value)
{
.Start();
}
else
{
.End();
}
}
}
}
private double
{
get
{
if (Is口)
{
return * 2.0 * ( ? (2.0 * base.) : 1.0) * ( ? (0.9 * base.) : 1.0);
}
if (Is膣)
{
return * 1.0 * ( ? (2.0 * base.) : 1.0) * ( ? (0.9 * base.) : 1.0);
}
if (Is肛)
{
return * 1.0 * ( ? (2.0 * base.) : 1.0) * ( ? (0.9 * base.) : 1.0);
}
if (Is糸)
{
return * 0.8 * ( ? (2.0 * base.) : 1.0) * ( ? (0.9 * base.) : 1.0);
}
return 0.0;
}
}
private double
{
set
{
if (.Element is _アナル)
{
.Element.Yv = (.Element.Yv + value).Clamp(0.0, Bod.Is獣 ? A通常獣最大v : A通常人最大v);
}
else if (.Element is )
{
.Element.Yv = (.Element.Yv + value).Clamp(0.0, Bod.Is獣 ? P通常獣最大v : P通常人最大v);
}
else
{
.Element.Yv = (.Element.Yv + value).Clamp(0.0, 1.0);
}
}
}
private double
{
set
{
if (Bod._表示)
{
dv = (dv + value).Clamp(0.0, 1.0);
dy = ((dv >= 1.0) ? (.Element.Body.CountY - 1) : ((int)((double).Element.Body.CountY * dv)));
if (.Element is _アナル)
{
dy = dy.Limit(0, Bod.Is獣 ? A断面獣最大i : A断面人最大i);
}
else if (.Element is )
{
dy = dy.Limit(0, Bod.Is獣 ? P断面獣最大i : P断面人最大i);
}
if ((!(.Element is ) || (.Element.Xi != 6 && .Element.Xi != 7)) && !(.Element is ) && (!Bod.Is獣 || (!(.Element is ) && !(.Element is ))))
{
if (.Element is _デンマ)
{
Bod..Yv = dv.Clamp(v, v3);
}
else if (.Element is || .Element is )
{
Bod..Yv = dv.Clamp(0.0, v2);
}
else
{
Bod..Yv = dv.Clamp(0.0, 1.0);
}
}
if (!Bod.Is獣 && !(.Element is _デンマ) && !(.Element is ) && !(.Element is ) && !(.Element is ))
{
Bod..Y = 1.0 + 0.2 * dv.Clamp(0.0, 1.0);
Bod.VaginalCumDrip.YC = Bod..Y;
Bod..YC = Bod..Y;
}
if (!(.Element is ) || (.Element.Xi != 6 && .Element.Xi != 7))
{
Bod..Yv = dv.Clamp(v, 1.0);
}
}
else
{
if (.Element is _アナル)
{
.Element.Yv = (.Element.Yv + value).Clamp(0.0, Bod.Is獣 ? A通常獣最大v : A通常人最大v);
}
else if (.Element is )
{
.Element.Yv = (.Element.Yv + value).Clamp(0.0, Bod.Is獣 ? P通常獣最大v : P通常人最大v);
}
else
{
.Element.Yv = (.Element.Yv + value).Clamp(0.0, 1.0);
}
if (!(.Element is ) || (.Element.Xi != 6 && .Element.Xi != 7))
{
Bod..Yv = .Element.Yv.Clamp(v, 1.0);
}
}
}
}
private double
{
set
{
.Element.Yv = (.Element.Yv + value).Clamp(0.0, 1.0);
}
}
private double
{
set
{
if (.Element is _アナル)
{
.Element.Yv = (.Element.Yv + value).Clamp(0.0, A通常人最大v);
}
else if (.Element is )
{
.Element.Yv = (.Element.Yv + value).Clamp(0.0, P通常人最大v);
}
else
{
.Element.Yv = (.Element.Yv + value).Clamp(0.0, 1.0);
}
}
}
public double Insert
{
get
{
if (!Is膣 || !Bod._表示)
{
return .Element.Yv;
}
return dv;
}
set
{
if (Is口)
{
= value;
}
else if (Is膣)
{
= value;
}
else if (Is肛)
{
= value;
}
else if (Is糸)
{
= value;
}
}
}
public ToolType
{
get
{
if (.Element is )
{
return ToolType.Hand;
}
if (.Element is )
{
return ToolType.;
}
if (.Element is )
{
return ToolType.Penis;
}
if (.Element is _ディル)
{
return ToolType.Dildo;
}
if (.Element is _コモン)
{
return ToolType.Vibrator;
}
if (.Element is _ドリル)
{
return ToolType.Drill;
}
if (.Element is _デンマ)
{
return ToolType.;
}
if (.Element is _アナル)
{
return ToolType.AnalVibrator;
}
if (.Element is )
{
return ToolType.;
}
if (.Element is )
{
return ToolType.;
}
return ToolType.none;
}
}
private static void sound口()
{
if ((0.1 * Player.).Lot())
{
switch (Rng.XS.Next(2))
{
case 0:
//Sounds.挿抜口1.Play();
break;
case 1:
//Sounds.挿抜口2.Play();
break;
}
}
}
private static void sound膣()
{
if ((0.1 * Player. * Player.Tension.Inverse()).Lot())
{
switch (Rng.XS.Next(2))
{
case 0:
//Sounds.挿抜前1.Play();
break;
case 1:
//Sounds.挿抜前2.Play();
break;
}
}
}
private static void sound肛()
{
if ((0.1 * Player. * Player.Tension.Inverse()).Lot())
{
switch (GeometryUtils.GetRandomIndex(4.0, 4.0, 1.0, 1.0))
{
case 0:
//Sounds.挿抜前3.Play();
break;
case 1:
//Sounds.挿抜前4.Play();
break;
case 2:
//Sounds.挿抜後1.Play();
break;
case 3:
//Sounds.挿抜後2.Play();
break;
}
}
}
private static void sound糸()
{
if ((0.1 * Player. * Player.Tension.Inverse()).Lot())
{
switch (Rng.XS.Next(2))
{
case 0:
//Sounds.挿抜糸1.Play();
break;
case 1:
//Sounds.挿抜糸2.Play();
break;
}
}
}
private double clip(double v)
{
return (v - 0.35) / 0.65;
}
public void ()
{
if (Player.V_口 > 0.35)
{
調UI..Enqueue(delegate(RenderArea a)
{
調UI..Sound(a, Bod..GetAreaPoint(0.05), GlobalState..GetVal(clip(Player.V_口), Player.V_固有値乱数), new Font("MS Gothic", 1f), Color.HotPink.S(Player.V_口.Clamp(0.5, 1.0)), 0.2 + 0.2 * Rng.XS.NextDouble() * Player.V_口, b: true);
});
}
}
public void ()
{
if (Player.V_口 > 0.35 && CP挿入.GetFlag(0.1 + 0.1 * Player.V_口 * 0.8))
{
調UI..Enqueue(delegate(RenderArea a)
{
調UI..Sound(a, Bod..GetAreaPoint(0.05), GlobalState..GetVal(clip(Player.V_口), Player.V_固有値乱数), new Font("MS Gothic", 1f), Color.HotPink.S(Player.V_口.Clamp(0.5, 1.0)), 0.2 + 0.2 * Rng.XS.NextDouble() * Player.V_口, b: true);
});
}
}
public void ()
{
if (Player.V_口 > 0.35)
{
調UI..Enqueue(delegate(RenderArea a)
{
調UI..Sound(a, Bod..GetAreaPoint(0.05), GlobalState..GetVal(clip(Player.V_口), Player.V_固有値乱数), new Font("MS Gothic", 1f), Color.HotPink.S(Player.V_口.Clamp(0.5, 1.0)), 0.2 + 0.2 * Rng.XS.NextDouble() * Player.V_口, b: true);
});
}
}
public void ()
{
if (Player.V_膣 > 0.35)
{
調UI..Enqueue(delegate(RenderArea a)
{
調UI..Sound(a, Bod..GetAreaPoint(0.04), GlobalState..GetVal(clip(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);
});
}
}
public void ()
{
if (Player.V_膣 > 0.35 && CP挿入.GetFlag(0.1 + 0.1 * Player.V_膣 * 0.8))
{
調UI..Enqueue(delegate(RenderArea a)
{
調UI..Sound(a, Bod..GetAreaPoint(0.04), GlobalState..GetVal(clip(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);
});
}
}
public void ()
{
if (Player.V_膣 > 0.35)
{
調UI..Enqueue(delegate(RenderArea a)
{
調UI..Sound(a, Bod..GetAreaPoint(0.04), GlobalState..GetVal(clip(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);
});
}
}
public void ()
{
if (Player.V_肛 > 0.35)
{
調UI..Enqueue(delegate(RenderArea a)
{
調UI..Sound(a, Bod..GetAreaPoint(0.04), GlobalState..GetVal(clip(Player.V_肛), Player.V_固有値乱数), new Font("MS Gothic", 1f), Color.Coral.S(Player.V_肛.Clamp(0.5, 1.0)), 0.2 + 0.2 * Rng.XS.NextDouble() * Player.V_肛, b: true);
});
}
}
public void ()
{
if (Player.V_肛 > 0.35 && CP挿入.GetFlag(0.1 + 0.1 * Player.V_肛 * 0.8))
{
調UI..Enqueue(delegate(RenderArea a)
{
調UI..Sound(a, Bod..GetAreaPoint(0.04), GlobalState..GetVal(clip(Player.V_肛), Player.V_固有値乱数), new Font("MS Gothic", 1f), Color.Coral.S(Player.V_肛.Clamp(0.5, 1.0)), 0.2 + 0.2 * Rng.XS.NextDouble() * Player.V_肛, b: true);
});
}
}
public void ()
{
if (Player.V_肛 > 0.35)
{
調UI..Enqueue(delegate(RenderArea a)
{
調UI..Sound(a, Bod..GetAreaPoint(0.04), GlobalState..GetVal(clip(Player.V_肛), Player.V_固有値乱数), new Font("MS Gothic", 1f), Color.Coral.S(Player.V_肛.Clamp(0.5, 1.0)), 0.2 + 0.2 * Rng.XS.NextDouble() * Player.V_肛, b: true);
});
}
}
public void ()
{
if (Player.V_糸 > 0.35)
{
調UI..Enqueue(delegate(RenderArea a)
{
調UI..Sound(a, Bod..GetAreaPoint(0.04), GlobalState..GetVal(clip(Player.V_糸), Player.V_固有値乱数), new Font("MS Gothic", 1f), Color.MediumOrchid.S(Player.V_糸.Clamp(0.5, 1.0)), 0.2 + 0.2 * Rng.XS.NextDouble() * Player.V_糸, b: true);
});
}
}
public void ()
{
if (Player.V_糸 > 0.35 && CP挿入.GetFlag(0.1 + 0.1 * Player.V_糸 * 0.8))
{
調UI..Enqueue(delegate(RenderArea a)
{
調UI..Sound(a, Bod..GetAreaPoint(0.04), GlobalState..GetVal(clip(Player.V_糸), Player.V_固有値乱数), new Font("MS Gothic", 1f), Color.MediumOrchid.S(Player.V_糸.Clamp(0.5, 1.0)), 0.2 + 0.2 * Rng.XS.NextDouble() * Player.V_糸, b: true);
});
}
}
public void ()
{
if (Player.V_糸 > 0.35)
{
調UI..Enqueue(delegate(RenderArea a)
{
調UI..Sound(a, Bod..GetAreaPoint(0.04), GlobalState..GetVal(clip(Player.V_糸), Player.V_固有値乱数), new Font("MS Gothic", 1f), Color.MediumOrchid.S(Player.V_糸.Clamp(0.5, 1.0)), 0.2 + 0.2 * Rng.XS.NextDouble() * Player.V_糸, b: true);
});
}
}
public void _()
{
if (CP振動.GetFlag(0.1 + 0.1 * base.))
{
調UI..Enqueue(delegate(RenderArea a)
{
調UI..Sound(a, .Element..GetAreaPoint(0.04), GlobalState..GetVal(1.0, 1.0), new Font("MS Gothic", 1f), ColorHelper.Black, 0.1 + 0.1 * base., b: true);
});
}
}
public void MoveR(ref MouseButtons mb, ref Vector2D cp, ref Color hc, ref ContactD cd)
{
if (調UI.SubFocus.Contains(this))
{
vr = cp;
//TODO Check if this works?
Vector2D px_diff = Med.FromBasePosition(or - vr);
xr = px_diff.X * -0.008;
yr = px_diff.Y * -0.008;
if ( == ContactType.Vagina)
{
= yr * Player.;
調UI.Action(ContactType.Vagina, ActionType.Insertion, CurrentState.Continue, , .Element.Yi, 1, : false, : false);
Player.();
Player.();
();
}
else if ( == ContactType.Anal)
{
= yr * Player.;
調UI.Action(ContactType.Anal, ActionType.Insertion, CurrentState.Continue, , .Element.Yi, 1, : false, : false);
Player.();
Player.();
();
}
.Element.C = (100.0 * xr).Clamp(-5.0, 5.0);
or = vr;
}
}
public void SetPosition()
{
if (!Is挿入)
{
return;
}
if (Is口)
{
a = .Element.C;
調UI.Set_口(.Element);
.Element.C = a;
}
else if (Is膣)
{
if (Bod._表示)
{
Bod..PA();
.Element.B = Bod..Body.Current.EnumAllPar().First((ShapePart p_) => p_.Tag.Contains("膣口")).Position;
p0 = .Element.Body.pr[.Element.Body[.Element.Body.IndexX][0]];
py = .Element.Body.pr[.Element.Body[.Element.Body.IndexX][dy]];
if (pn)
{
bp = py.PositionBase;
py.PositionBase = .Element.B;
y0 = py.ToGlobal(py.OP[0].ps[psi]).Y;
py.PositionBase = bp;
}
else
{
y0 = py.ToGlobal(py.OP[0].ps[psi]).Y;
}
.Element.B = .Element.B.AddY(p0.BasePointBase.Y - py.BasePointBase.Y);
if (pn)
{
bp = p0.PositionBase;
p0.PositionBase = .Element.B;
.Element.B = .Element.B.AddY(y0 - p0.ToGlobal(p0.OP[0].ps[psi]).Y);
p0.PositionBase = bp;
}
else
{
.Element.B = .Element.B.AddY(y0 - p0.ToGlobal(p0.OP[0].ps[psi]).Y);
}
}
else
{
a = .Element.C;
調UI.Set_膣口(.Element);
.Element.C = a;
}
}
else if (Is肛)
{
a = .Element.C;
調UI.Set_肛門(.Element);
.Element.C = a;
}
else if (Is糸)
{
a = .Element.C;
調UI.Set_出糸(.Element);
.Element.C = a;
}
}
public void ()
{
Is挿入 = false;
if (Is口)
{
Bod.i = 9;
}
else if (Is膣)
{
Bod..Xi = 1;
Bod..Yi = 0;
if (!(.Element is ) || .Element.Xi != 7)
{
Bod.. = ;
}
if (Bod._表示)
{
Insert = 0.0;
Bod..Yi = 0;
dv = 0.0;
dy = 0;
}
.Under = false;
}
else if (Is肛)
{
.Under = false;
}
else
{
_ = Is糸;
}
= ContactType.none;
.Element.C = 0.0;
if (.Element is )
{
.Element.Xi = 0;
}
.Element.Yi = 0;
if (調UI.s != null)
{
調UI.s..Element.C = 0.0;
調UI.s.Insert = 1.0;
}
調UI.();
}
private string 0()
{
object[] obj = new object[8]
{
"\r\nMCl:",
? GameText. : GameText.,
"\r\nWh:",
GameText.L,
,
null,
null,
null
};
_ = Is口;
obj[5] = "\r\nRCl:" + GameText.;
obj[6] = "\r\nLUp&Mo↓:";
obj[7] = GameText.;
return string.Concat(obj);
}
private void 1(string str)
{
if (!GlobalState.GameData.)
{
return;
}
if ()
{
ip.SubInfoIm = str + 0();
}
else if (!.Run)
{
InfoPanel obj = ip;
string[] obj2 = new string[6] { str, "\r\n", null, null, null, null };
object obj3;
if ( != 調UI.CM && != 調UI.CM && != 調UI.CM)
{
_ = Is口;
obj3 = "RCl:" + GameText. + "\r\n";
}
else
{
obj3 = "";
}
obj2[2] = (string)obj3;
obj2[3] = "LUp&Mo↓:";
obj2[4] = GameText.;
obj2[5] = "\r\n";
obj.SubInfoIm = string.Concat(obj2);
}
}
private string 0()
{
return "MCl:" + ( ? GameText. : GameText.) + "\r\nWh:" + GameText.L + + "\r\nRCl:" + GameText.;
}
private void 1()
{
if (GlobalState.GameData.)
{
if ()
{
ip.SubInfoIm = 0();
}
else if ( == 調UI.CM)
{
ip.SubInfoIm = "RCl:" + GameText.;
}
else
{
ip.SubInfoIm = "";
}
}
}
private void (ref ContactD cd)
{
if (GlobalState.GameData.)
{
if ()
{
ip.SubInfoIm = (Is押付 ? ("LUp:" + GameText. + "\r\n") : (調UI.IsHitCha(ref cd) ? ("LDo:" + GameText. + "\r\n") : "")) + 0();
}
else if ( == 調UI.CM)
{
ip.SubInfoIm = (Is押付 ? ("LUp:" + GameText.) : (調UI.IsHitCha(ref cd) ? ("LDo:" + GameText.) : ""));
}
else if ( == 調UI.CM)
{
ip.SubInfoIm = "RCl:" + GameText.;
}
else
{
ip.SubInfoIm = "";
}
}
}
private void (string str)
{
if (GlobalState.GameData.)
{
ip.SubInfoIm = str + "\r\nLDo&Mo↑:" + GameText.;
}
}
public void (double v)
{
if (Bod._表示)
{
.Element.Yi = 0;
Bod..Xi = 3;
dv = v;
dy = ((dv >= 1.0) ? (.Element.Body.CountY - 1) : ((int)((double).Element.Body.CountY * dv)));
if (.Element is _アナル)
{
dy = dy.Limit(0, Bod.Is獣 ? A断面獣最大i : A断面人最大i);
}
else if (.Element is )
{
dy = dy.Limit(0, Bod.Is獣 ? P断面獣最大i : P断面人最大i);
}
if ((!(.Element is ) || (.Element.Xi != 6 && .Element.Xi != 7)) && !(.Element is ) && (!Bod.Is獣 || (!(.Element is ) && !(.Element is ))))
{
if (.Element is _デンマ)
{
Bod..Yv = dv.Clamp(v, v3);
}
else if (.Element is || .Element is )
{
Bod..Yv = dv.Clamp(0.0, v2);
}
else
{
Bod..Yv = dv.Clamp(0.0, 1.0);
}
}
if (!Bod.Is獣 && !(.Element is _デンマ) && !(.Element is ) && !(.Element is ) && !(.Element is ))
{
Bod..Y = 1.0 + 0.2 * dv.Clamp(0.0, 1.0);
Bod.VaginalCumDrip.YC = Bod..Y;
Bod..YC = Bod..Y;
}
if (!(.Element is ) || (.Element.Xi != 6 && .Element.Xi != 7))
{
Bod..Yv = dv.Clamp(v, 1.0);
}
}
else
{
Bod..Xi = 2;
if (.Element is _アナル)
{
.Element.Yv = v.Clamp(0.0, Bod.Is獣 ? A通常獣最大v : A通常人最大v);
}
else if (.Element is )
{
.Element.Yv = v.Clamp(0.0, Bod.Is獣 ? P通常獣最大v : P通常人最大v);
}
else
{
.Element.Yv = v.Clamp(0.0, 1.0);
}
if (!(.Element is ) || (.Element.Xi != 6 && .Element.Xi != 7))
{
Bod..Yv = .Element.Yv.Clamp(v, 1.0);
}
}
}
public void ()
{
if (.Element is && Insert > oi && Insert > 0.8)
{
Cha.BodySway.Start();
}
oi = Insert;
}
public void Move(ref MouseButtons mb, ref Vector2D cp, ref Color hc, ref ContactD cd)
{
if (!.Run)
{
MoveO(ref mb, ref cp, ref hc, ref cd);
}
}
public void MoveO(ref MouseButtons mb, ref Vector2D cp, ref Color hc, ref ContactD cd)
{
this.cd = cd;
if (調UI.Focus != && !調UI.SubFocus.Contains(this) && !.Run)
{
return;
}
//~~TODO~~ fix?
//v = (挿抜モーション.Run ? cp : _2DGAMELIB._Con.ToVector2D(Cursor.Position));
v = (.Run ? cp : Med.CursorPosition);
System.Diagnostics.Debug.WriteLine("cursor pos: {0} {1}", Med.CursorPosition.X, Med.CursorPosition.Y);
if (調UI.Focus == || .Run)
{
if (Isモード)
{
Vector2D px_diff = Med.FromBasePosition(o - v);
x = px_diff.X * 0.008;
y = px_diff.Y * 0.008;
System.Diagnostics.Debug.WriteLine("x y diffs: {0} {1}", x, y);
if (Is挿入)
{
.Element.C = (100.0 * x).Clamp(-5.0, 5.0);
if (Is口)
{
1(GameText.);
= y * Player.;
調UI.Action(ContactType.Mouth, ActionType.Insertion, CurrentState.Continue, , .Element.Yi, 1, : false, : false);
Player.();
Player.();
();
//if (mb != MouseButtons.Left && 対象.Element.Yi == 0 && o.Y < v.Y && !挿抜モーション.Run)
if (mb != MouseButtons.Left && .Element.Yi == 0 && o.Y > v.Y && !.Run)
{
調UI.Action(ContactType.Mouth, ActionType.Insertion, CurrentState.End, , 0, 1, : false, : false);
Player.();
Player.();
();
();
//~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Element.位置B));
Med.CursorPosition = Med.FromBasePosition(.Element.B);
1();
if (調UI...Run)
{
調UI...End();
}
if (調UI..)
{
if (Cha.CharacterData.SkillL > 0.5 * GlobalState.GameData.TrainingTarget.MaxSkillL && Cha.CharacterData.Affection > 0.6 && Cha.CharacterData.Lust > 0.5)
{
Cha.Swallow.Start();
}
else
{
Cha.MouthCumDrip.Start();
}
調UI..Count = 0;
調UI.. = false;
}
.End();
}
if (Player.Wetness > 0.5 && Player.Lvn > Player.Lvo)
{
sound口();
}
}
else if (Is肛)
{
1(GameText.);
= y * Player.;
調UI.Action(ContactType.Anal, ActionType.Insertion, CurrentState.Continue, , .Element.Yi, 1, : false, : false);
Player.();
Player.();
();
//if (mb != MouseButtons.Left && 対象.Element.Yi == 0 && o.Y < v.Y && !挿抜モーション.Run)
if (mb != MouseButtons.Left && .Element.Yi == 0 && o.Y > v.Y && !.Run)
{
調UI.Action(ContactType.Anal, ActionType.Insertion, CurrentState.End, , 0, 1, : false, : false);
Player.();
Player.();
();
();
//~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Element.位置B));
Med.CursorPosition = Med.FromBasePosition(.Element.B);
1();
if (調UI..)
{
Cha.AnalCumDrip.Start();
調UI..Count = 0;
調UI.. = false;
}
.End();
}
if (Player.Wetness > 0.5 && Player.Lvn > Player.Lvo)
{
sound肛();
}
();
}
else if (Is膣)
{
1(GameText.);
= y * Player.;
調UI.Action(ContactType.Vagina, ActionType.Insertion, CurrentState.Continue, , ((int)(Insert * 5.0)).Clamp(0, 4), 1, : false, : false);
Player.();
Player.();
();
//if (mb != MouseButtons.Left && (Bod.断面_表示 ? (dy == 0) : (対象.Element.Yi == 0)) && o.Y < v.Y && !挿抜モーション.Run)
if (mb != MouseButtons.Left && (Bod._表示 ? (dy == 0) : (.Element.Yi == 0)) && o.Y > v.Y && !.Run)
{
調UI.Action(ContactType.Vagina, ActionType.Insertion, CurrentState.End, , 0, 1, : false, : false);
Player.();
Player.();
();
();
//~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Element.位置B));
Med.CursorPosition = Med.FromBasePosition(.Element.B);
1();
if (調UI..)
{
Cha.GenitalCumDrip.Start();
調UI..Count = 0;
調UI.. = false;
}
.End();
}
if (Player.Wetness > 0.5 && Player.Lvn > Player.Lvo)
{
sound膣();
}
();
}
else if (Is糸)
{
1(GameText.);
= y * Player.;
調UI.Action(ContactType.Thread, ActionType.Insertion, CurrentState.Continue, , .Element.Yi, 1, : false, : false);
Player.();
Player.();
();
//if (mb != MouseButtons.Left && 対象.Element.Yi == 0 && o.Y < v.Y && !挿抜モーション.Run)
if (mb != MouseButtons.Left && .Element.Yi == 0 && o.Y > v.Y && !.Run)
{
調UI.Action(ContactType.Thread, ActionType.Insertion, CurrentState.End, , 0, 1, : false, : false);
Player.();
Player.();
();
();
//~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Element.位置B));
Med.CursorPosition = Med.FromBasePosition(.Element.B);
1();
if (調UI..)
{
Cha.ThreadCumDrip.Start();
調UI..Count = 0;
調UI.. = false;
}
.End();
}
if (Player.Wetness > 0.5 && Player.Lvn > Player.Lvo)
{
sound糸();
}
}
}
else if (Is押付)
{
if (調UI.IsHitCha(ref cd))
{
if (!調UI.)
{
調UI.(ref cd);
調UI.Action(cd.c, ActionType.Contact, CurrentState.Start, , 0, 1, : false, : false);
Player.();
Player.();
}
if ( == 調UI.CM)
{
.Element.C = (100.0 * x).Clamp(-4.0, 4.0);
}
else
{
.Element.C = (100.0 * x).Clamp(-11.0, 11.0);
}
調UI.Action(cd.c, ActionType.Contact, CurrentState.Continue, , 0, 1, : false, : false);
Player.();
Player.();
}
else if (調UI.)
{
調UI.Action(cd.c, ActionType.Contact, CurrentState.End, , 0, 1, : false, : false);
Player.();
Player.();
.Element.C = 0.0;
調UI.();
}
(ref cd);
}
}
else if (Player.1 && cd.c == ContactType.Mouth && !調UI.SubFocus.Any(( e) => e.Is口))
{
調UI.Set_口(.Element);
(GameText.);
}
else if (cd.c == ContactType.Anal && !調UI.SubFocus.Any(( e) => e.Is肛))
{
調UI.Set_肛門(.Element);
(GameText.);
}
else if (cd.c == ContactType.Vagina && !調UI.SubFocus.Any(( e) => e.Is膣))
{
調UI.Set_膣口(.Element);
(GameText.);
}
else if (cd.c == ContactType.Thread && !調UI.SubFocus.Any(( e) => e.Is糸))
{
調UI.Set_出糸(.Element);
(GameText.);
}
else if ()
{
(ref cd);
}
else
{
1();
}
}
o = v;
}
private void ()
{
if (調UI.Focus == 調UI.CM || 調UI.Focus == 調UI.CM)
{
調UI.();
.Element.C = 0.0;
if (調UI.s != null)
{
調UI.s..Element.C = 0.0;
調UI.s.Insert = 1.0;
}
調UI.();
}
}
public void Down(ref MouseButtons mb, ref Vector2D cp, ref Color hc, ref ContactD cd)
{
if (調UI.Focus != )
{
return;
}
if (mb == MouseButtons.Left)
{
if (!Isモード)
{
if (Player.1 && cd.c == ContactType.Mouth && !調UI.SubFocus.Any(( e) => e.Is口))
{
調UI.(ref cd);
Is挿入 = true;
= cd.c;
if (.Element is )
{
.Element.Xi = 1;
}
.Element.Yi = 0;
Bod.i = 13;
if (Player.2)
{
調UI...Start();
}
調UI.Action(ContactType.Mouth, ActionType.Insertion, CurrentState.Start, , 0, 1, : false, : false);
Player.();
Player.();
();
調UI.();
調UI.();
調UI.();
}
else if (cd.c == ContactType.Anal && !調UI.SubFocus.Any(( e) => e.Is肛))
{
調UI.(ref cd);
Is挿入 = true;
= cd.c;
if (.Element is )
{
.Element.Xi = 1;
}
.Element.Yi = 0;
.Under = true;
調UI.Action(ContactType.Anal, ActionType.Insertion, CurrentState.Start, , 0, 1, : false, : false);
Player.();
Player.();
();
調UI.();
調UI.();
}
else if (cd.c == ContactType.Vagina && !調UI.SubFocus.Any(( e) => e.Is膣))
{
調UI.(ref cd);
Is挿入 = true;
= cd.c;
if (.Element is )
{
.Element.Xi = 1;
}
.Element.Yi = 0;
.Under = true;
if (Bod._表示)
{
Bod..Xi = 3;
}
else
{
Bod..Xi = 2;
}
Bod..Yi = 1;
if ((!(.Element is ) || .Element.Xi != 7) && !(.Element is ))
{
= Bod..;
Bod.. = 1.0;
}
調UI.Action(ContactType.Vagina, ActionType.Insertion, CurrentState.Start, , 0, 1, : false, : false);
Player.();
Player.();
();
調UI.();
調UI.();
}
else if (cd.c == ContactType.Thread && !調UI.SubFocus.Any(( e) => e.Is糸))
{
調UI.(ref cd);
Is挿入 = true;
= cd.c;
if (.Element is )
{
.Element.Xi = 1;
}
.Element.Yi = 0;
調UI.Action(ContactType.Thread, ActionType.Insertion, CurrentState.Start, , 0, 1, : false, : false);
Player.();
Player.();
();
調UI.();
調UI.();
}
else if ( && !Is押付 && 調UI.IsHitCha(ref cd))
{
調UI.(ref cd);
Is押付 = true;
(ref cd);
調UI.Action(cd.c, ActionType.Contact, CurrentState.Start, , 0, 1, : false, : false);
Player.();
Player.();
調UI.();
}
}
else if ((調UI.Focus == 調UI.CM && Is口) || (調UI.Focus != 調UI.CM && 調UI.Focus != 調UI.CM))
{
if ()
{
= false;
return;
}
if (.Run)
{
.End();
return;
}
.Start();
();
}
}
else if (mb == MouseButtons.Middle)
{
if (!)
{
return;
}
= !;
if ()
{
= !;
}
if (Is挿入)
{
if (GlobalState.GameData.)
{
if (Is口)
{
ip.SubInfoIm = GameText. + 0();
}
else if (Is肛)
{
ip.SubInfoIm = GameText. + 0();
}
else if (Is膣)
{
ip.SubInfoIm = GameText. + 0();
}
else if (Is糸)
{
ip.SubInfoIm = GameText. + 0();
}
}
}
else
{
(ref cd);
}
}
else
{
if (mb != MouseButtons.Right || 調UI.)
{
return;
}
_ = Is口;
if (Is挿入 && ((!Is膣 && .Element.Yi > 0) || (Is膣 && Bod._表示 && dy > 0) || (!Bod._表示 && .Element.Yi > 0)))
{
if (調UI.Focus != 調UI.CM && 調UI.Focus != 調UI.CM && 調UI.Focus != 調UI.CM)
{
.End();
調UI.();
.Element.C = 0.0;
if (調UI.s != null)
{
調UI.s..Element.C = 0.0;
調UI.s.Insert = 1.0;
}
調UI.();
}
}
else if (調UI.Focus != 調UI.CM && !Isモード)
{
();
//~~TODO~~ fix?
//Cursor.Position = Med.BaseControlC.PointToScreen(Med.FromBasePosition(対象.Element.位置B));
Med.CursorPosition = Med.FromBasePosition(.Element.B);
調UI.();
}
}
}
public void Up(ref MouseButtons mb, ref Vector2D cp, ref Color hc, ref ContactD cd)
{
if (調UI.Focus == && mb == MouseButtons.Left && && Is押付)
{
調UI.Action(cd.c, ActionType.Contact, CurrentState.End, , 0, 1, : false, : false);
Player.();
Player.();
調UI.();
.Element.C = 0.0;
Is押付 = false;
if (調UI.IsHitCha(ref cd))
{
(ref cd);
}
else
{
1();
}
}
}
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 != || !)
{
return;
}
= ( + dt.Sign()).Clamp(1, 3);
if ()
{
.BaseSpeed = 10.0 * base.;
}
if (!GlobalState.GameData.)
{
ip.SubInfoIm = "Wh:" + GameText.L + ;
}
else if (Is挿入)
{
if (GlobalState.GameData.)
{
if ( == ContactType.Mouth)
{
ip.SubInfoIm = GameText. + 0();
}
else if ( == ContactType.Anal)
{
ip.SubInfoIm = GameText. + 0();
}
else if ( == ContactType.Vagina)
{
ip.SubInfoIm = GameText. + 0();
}
else if ( == ContactType.Thread)
{
ip.SubInfoIm = GameText. + 0();
}
}
}
else
{
(ref cd);
}
}
public (TrainingUI 調UI, CharacterElement )
: base(調UI, )
{
2 = this;
= !(.Element is ) && !(.Element is ) && !(.Element is ) && !(.Element is );
if ()
{
double d = 0.0005;
if (.Element is )
{
d *= 1.0;
}
else if (.Element is _ディル)
{
d *= 1.1;
}
else if (.Element is _コモン)
{
d *= 1.2;
}
else if (.Element is _ドリル)
{
d *= 1.2;
}
else if (.Element is _アナル)
{
d *= 1.1;
}
else if (.Element is _デンマ)
{
d *= 1.5;
}
Vector2D p = DataConsts.Vec2DZero;
bool f = !(.Element is );
bool v = .Element is _ディル || .Element is _コモン || .Element is _ドリル || .Element is _アナル || .Element is _デンマ;
= new Motion(-1.0, 1.0)
{
BaseSpeed = double.MaxValue,
OnStart = delegate
{
},
OnUpdate = delegate(Motion m)
{
p.X = m.Value * d * 2.;
if (v)
{
.Element.C = p.MulX(0.5);
.Element.Body.Current.EnumAllPar().First((ShapePart e) => e.Tag.Contains("ヘッド")).PositionCont = p;
}
else
{
.Element.C = p;
}
if (f && 2.Is挿入)
{
if (2.dy > 3)
{
p.X *= 0.5;
2.Bod..C = p;
}
else if (2.dy > 2)
{
p.X *= 0.25;
2.Bod..C = p;
}
}
if (2.Is挿入)
{
調UI.Action(2., ActionType.Insertion, CurrentState.Continue, 2., .Element.Yi, 2., : true, : false);
Player.();
}
else if (2.Is押付 && 調UI.)
{
調UI.Action(2.cd.c, ActionType.Tickle, CurrentState.Continue, 2., 0, 2., : true, : false);
Player.();
}
2._();
},
OnReach = delegate
{
},
OnLoop = delegate
{
},
OnEnd = delegate(Motion m)
{
m.ResetValue();
foreach (ShapePart item in .Element.Body.EnumAllPar())
{
item.PositionCont = DataConsts.Vec2DZero;
}
2.Bod..C = DataConsts.Vec2DZero;
}
};
調UI.Mots.Add(.GetHashCode().ToString(), );
}
= .Element is _ドリル;
if ()
{
= new Motion(0.0, 1.0)
{
BaseSpeed = 10.0 * base.,
OnStart = delegate
{
.Element.Xv = 0.0;
},
OnUpdate = delegate(Motion m)
{
.Element.Xv = m.Value;
.Element.Body.JoinPA();
if (2.Is挿入)
{
調UI.Action(2., ActionType.Insertion, CurrentState.Continue, 2., .Element.Yi, 2., : true, : false);
Player.();
}
else if (2.Is押付 && 調UI.)
{
調UI.Action(2.cd.c, ActionType.Tickle, CurrentState.Continue, 2., 0, 2., : true, : false);
Player.();
}
2._();
},
OnReach = delegate(Motion m)
{
m.ResetValue();
},
OnLoop = delegate
{
},
OnEnd = delegate(Motion m)
{
m.ResetValue();
.Element.Xv = 0.0;
}
};
調UI.Mots.Add(.GetHashCode().ToString(), );
}
= new Motion(0.0, 1.0)
{
BaseSpeed = 1.0,
OnStart = delegate
{
},
OnUpdate = delegate(Motion m)
{
2.Insert = (-0.01 - 0.04 * 2.Insert.Inverse()) * 2.;
if (2.Insert == 0.0)
{
調UI.Action(2., ActionType.Insertion, CurrentState.End, 2., 0, 1, : false, : false);
Player.();
switch (2.)
{
case ContactType.Mouth:
2.();
break;
case ContactType.Vagina:
2.();
break;
case ContactType.Anal:
2.();
break;
case ContactType.Thread:
2.();
break;
}
2.();
.Element.Intensity = 0.5;
.StaShow = true;
.使 = UsageStatus.Standby;
.Element. = false;
.Element.B = .bp;
.Element.C = DataConsts.Vec2DZero;
.Element.B = 0.0;
.Element.C = 0.0;
.Element.Xi = 0;
.Element.Yi = 0;
if (2.)
{
2. = false;
}
if (2.)
{
2. = false;
}
2. = false;
.Element.C = 1.09;
調UI.SubFocus.Remove(2);
m.End();
}
},
OnReach = delegate
{
},
OnLoop = delegate
{
},
OnEnd = delegate(Motion m)
{
m.ResetValue();
}
};
調UI.Mots.Add(.GetHashCode().ToString(), );
= || .Element is ;
A断面獣最大i = 5;
A断面人最大i = A断面獣最大i - 1;
double num = 1.0 / (double)調UI..Body.CountY;
A通常獣最大v = num * (double)(A断面獣最大i - 1);
A通常人最大v = num * (double)(A断面人最大i - 1);
P断面獣最大i = 11;
P断面人最大i = P断面獣最大i - 1;
double num2 = 1.0 / (double)調UI..Body.CountY;
P通常獣最大v = num2 * (double)(P断面獣最大i - 1);
P通常人最大v = num2 * (double)(P断面人最大i - 1);
psi = ((.Element is ) ? 2 : 0);
pn = .Element is ;
MouseButtons mb_ = MouseButtons.None;
Vector2D cp_ = default(Vector2D);
Color hc_ = default(Color);
= new Motion(0.0, 1.0)
{
BaseSpeed = 1.0 + 3.0 * Player.PlayerExcitement,
OnStart = delegate
{
},
OnUpdate = delegate(Motion m)
{
m.BaseSpeed = 1.0 + 3.0 * Player.PlayerExcitement;
cp_ = new Vector2D(0.0, 100.0 * m.Value);
2.MoveO(ref mb_, ref cp_, ref hc_, ref 2.cd);
},
OnReach = delegate
{
},
OnLoop = delegate
{
},
OnEnd = delegate
{
}
};
調UI.Mots.Add(.GetHashCode().ToString(), );
}
public void SetCha(Character Cha)
{
base.Cha = Cha;
Bod = Cha.Body;
v = 1.0 / (double)Bod..Body.CountY;
v = 1.0 / (double)Bod..Body.CountY;
v2 = v * 2.0;
v3 = v * 3.0;
}
public new void Reset()
{
if (Is挿入)
{
switch ()
{
case ContactType.Mouth:
();
break;
case ContactType.Vagina:
();
break;
case ContactType.Anal:
();
break;
case ContactType.Thread:
();
break;
}
();
.Element.Intensity = 0.5;
.StaShow = true;
.使 = UsageStatus.Standby;
.Element. = false;
.Element.B = .bp;
.Element.C = DataConsts.Vec2DZero;
.Element.B = 0.0;
.Element.C = 0.0;
.Element.Xi = 0;
.Element.Yi = 0;
if ()
{
= false;
}
if ()
{
= false;
}
= false;
.Element.C = 1.09;
調UI.SubFocus.Remove(this);
}
base.Reset();
CP挿入.Reset();
CP振動.Reset();
= ContactType.none;
= 0.0;
Is押付 = false;
Is挿入 = false;
?.End();
= false;
?.End();
= false;
?.End();
?.End();
= false;
= 1.0;
= 1.0;
= 1.0;
= 1.0;
dv = 0.0;
dy = 0;
= 0.0;
= 0.0;
= 0.0;
= 0.0;
vr = default(Vector2D);
or = default(Vector2D);
xr = 0.0;
yr = 0.0;
a = 0.0;
y0 = 0.0;
p0 = null;
py = null;
bp = default(Vector2D);
();
oi = 0.0;
cd = default(ContactD);
v = default(Vector2D);
o = default(Vector2D);
x = 0.0;
y = 0.0;
}
}
}