Files
SlaveMatrix-SDL/SlaveMatrix/SlaveMatrix/BodyPartClasses/剃刀処理.cs
2025-10-25 21:25:58 +04:00

189 lines
4.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.Drawing;
using _2DGAMELIB;
namespace SlaveMatrix
{
public class : B
{
public ConstProp CP = new ConstProp();
private bool Is剃り;
private Vector2D v;
private double a;
private Par p;
public void ()
{
if (CP.GetFlag(0.1 * Cha.ChaD.))
{
調UI..Enqueue(delegate(RenderArea a)
{
調UI..Sound(a, .Ele..GetAreaPoint(0.01), Sta..GetVal(Cha.ChaD., RNG.XS.NextDouble()), new Font("MS Gothic", 1f), Col.Black, 0.1 + 0.1 * RNG.XS.NextDouble(), b: true);
});
}
}
private void ()
{
if (Sta.GameData.)
{
ip.SubInfoIm = "RCl:" + GameText.;
}
}
private void ()
{
if (Sta.GameData.)
{
ip.SubInfoIm = "LUp:" + GameText. + "\r\nMo:" + GameText.;
}
}
private void ()
{
if (Sta.GameData.)
{
ip.SubInfoIm = "LDo:" + GameText.;
}
}
private void (ref Color hc)
{
p = null;
if (Bod._人 != null && Bod._人..IsHit(ref hc))
{
p = Bod._人..GetHitPar_(hc);
}
if (p != null && (p.Tag == "獣毛" || p.Tag == "陰毛"))
{
();
}
else
{
();
}
}
public void Move(ref MouseButtons mb, ref Vector2D cp, ref Vector2D op, ref Color hc, ref ContactD cd)
{
if (調UI.Focus != )
{
return;
}
if (mb == MouseButtons.Left && Is剃り)
{
if (調UI.IsHitCha(ref cd))
{
調UI.(ref cd);
v = op - cp;
a = 0.0 - v.Angle02π(-Dat.Vec2DUnitY).ToDegree();
if (!double.IsNaN(a))
{
.Ele.C = a;
}
調UI.Action(cd.c, ActionType.Shaving, CurrentState.Continue, ToolType., 0, 1, : false, : false);
Player.();
Player.();
();
Cha.ChaD. = (Cha.ChaD. - 0.01).Clamp(0.0, 1.0);
Cha.Bod._人.CD. = Cha.ChaD. * Cha.ChaD.;
Cha.Bod._人._獣毛CD. = Cha.ChaD.;
Cha.Bod._人._ハートCD. = Cha.ChaD..Inverse() * Cha.ChaD.;
}
else if (調UI.)
{
調UI.Action(cd.c, ActionType.Shaving, CurrentState.End, ToolType., 0, 1, : false, : false);
Player.();
Player.();
.Ele.C = 0.0;
調UI.();
}
();
}
else
{
(ref hc);
}
}
public void Down(ref MouseButtons mb, ref Vector2D cp, ref Color hc, ref ContactD cd)
{
if (調UI.Focus != )
{
return;
}
if (!)
{
= true;
return;
}
p = null;
if (Bod._人 != null && Bod._人..IsHit(ref hc))
{
p = Bod._人..GetHitPar_(hc);
}
if (mb == MouseButtons.Left && p != null && (p.Tag == "獣毛" || p.Tag == "陰毛"))
{
調UI.(ref cd);
Is剃り = true;
();
調UI.Action(cd.c, ActionType.Shaving, CurrentState.Start, ToolType., 0, 1, : false, : false);
Player.();
Player.();
}
else if (mb == MouseButtons.Right && !Is剃り)
{
Is剃り = false;
.Ele.C = 0.0;
調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.Shaving, CurrentState.End, ToolType., 0, 1, : false, : false);
Player.();
Player.();
調UI.();
.Ele.C = 0.0;
Is剃り = false;
(ref hc);
}
}
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)
{
}
public (TrainingUI 調UI, CM T剃刀)
: base(調UI, T剃刀)
{
}
public void SetCha(Cha Cha)
{
base.Cha = Cha;
Bod = Cha.Bod;
}
public new void Reset()
{
base.Reset();
CP.Reset();
Is剃り = false;
v = default(Vector2D);
a = 0.0;
p = null;
}
}
}