Files
SlaveMatrix-SDL/SlaveMatrix/SlaveMatrix/BodyPartClasses/スタンプB.cs
2026-06-13 22:38:57 -05:00

101 lines
2.3 KiB
C#

using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using _2DGAMELIB;
using SlaveMatrix.GameClasses;
namespace SlaveMatrix
{
public class B : Stamp
{
private Motion ;
public override void Draw(RenderArea Are)
{
try
{
if (sta.Count <= 0)
{
return;
}
foreach (sep stum in sta)
{
if (stum.Sta.)
{
p = stum.Element.Body.GetCurrent().GetPar(stum.Path);
stum.Sta.B = p.ToGlobal(stum.Pos);
stum.Sta.();
stum.Sta.Body.Draw(Are);
}
}
}
catch
{
}
}
public void Add(Vector2D cp, Color hc, Dictionary<Element, List<Element>> )
{
he = Bod.GetHitEle(hc);
if (2(he))
{
if (sta.Count >= 33)
{
sep = sta[0];
sta.RemoveAt(0);
sep.Sta.Dispose();
}
sep = default(sep);
sep.Sta = ElementData.GetEle(Are.DisplayUnitScale, Med, GlobalState.GameData.);
sep.Sta.SetHitFalse();
sep.Sta.Xv = Rng.XS.NextDouble();
sep.Sta. = Rng.XS.NextBool();
sep.Element = he;
sep.ShapePart = he.Body.GetHitPar_(hc);
sep.Path = sep.ShapePart.GetPath();
sep.Pos = sep.ShapePart.ToLocal(cp);
if (.ContainsKey(he))
{
[he].Add(sep.Sta);
}
else
{
[he] = new List<Element> { sep.Sta };
}
sta.Add(sep);
.Start();
}
}
public B(ModeEventDispatcher Med, RenderArea Are, Character Cha, Body Bod, ElementData ElementData, Motions Mots)
: base(Med, Are, Cha, Bod, ElementData)
{
Element e = null;
= new Motion(0.0, 1.0)
{
BaseSpeed = 1.0,
OnStart = delegate(Motion m)
{
e = sta.Last().Sta;
m.Max = Rng.XS.NextDouble();
},
OnUpdate = delegate(Motion m)
{
e.Yv = m.Value;
},
OnReach = delegate(Motion m)
{
m.End();
},
OnLoop = delegate
{
},
OnEnd = delegate
{
}
};
Mots.Add(ElementData.GetHashCode().ToString(), );
}
}
}