DE -> DrawableElement

This commit is contained in:
2026-06-14 01:15:33 +02:00
parent 824bc4d3fa
commit 46d2762569
2 changed files with 30 additions and 27 deletions

View File

@@ -3,6 +3,9 @@ using System.Drawing;
namespace _2DGAMELIB namespace _2DGAMELIB
{ {
/// <summary>
/// Represents a screen module/mode
/// </summary>
public class Module public class Module
{ {
public Action<MouseButtons, Vector2D, Color> Down = delegate public Action<MouseButtons, Vector2D, Color> Down = delegate

View File

@@ -7,11 +7,11 @@ using _2DGAMELIB;
namespace SlaveMatrix namespace SlaveMatrix
{ {
public class DE : Element public class DrawableElement : Element
{ {
public Action<RenderArea> ; public Action<RenderArea> ;
public DE(Element src, Action<RenderArea> ) public DrawableElement(Element src, Action<RenderArea> )
{ {
Par = src; Par = src;
Body = src.Body; Body = src.Body;
@@ -246,7 +246,7 @@ namespace SlaveMatrix
public _蛇 ; public _蛇 ;
public DE ; public DrawableElement ;
public _蟲 ; public _蟲 ;
@@ -300,7 +300,7 @@ namespace SlaveMatrix
public _蠍 ; public _蠍 ;
public DE ; public DrawableElement ;
public _植 ; public _植 ;
@@ -4390,7 +4390,7 @@ namespace SlaveMatrix
where !bod.2.Contains(e) where !bod.2.Contains(e)
select e, ); select e, );
} }
= new DE(, .); = new DrawableElement(, .);
if (._接続 != null) if (._接続 != null)
{ {
Sort(._接続.Select((Element e) => e.EnumEle()).JoinEnum(), ); Sort(._接続.Select((Element e) => e.EnumEle()).JoinEnum(), );
@@ -4602,11 +4602,11 @@ namespace SlaveMatrix
} }
if (Chest_獣 != null) if (Chest_獣 != null)
{ {
1.Add(new DE(Chest_獣, Chest_獣.)); 1.Add(new DrawableElement(Chest_獣, Chest_獣.));
} }
if (Chest_獣 != null) if (Chest_獣 != null)
{ {
1.Add(new DE(Chest_獣, Chest_獣.)); 1.Add(new DrawableElement(Chest_獣, Chest_獣.));
} }
if (_獣 != null) if (_獣 != null)
{ {
@@ -4826,7 +4826,7 @@ namespace SlaveMatrix
Sort(._接続.Select((Element e) => e.EnumEle()).JoinEnum(), ); Sort(._接続.Select((Element e) => e.EnumEle()).JoinEnum(), );
} }
1.Add(); 1.Add();
= new DE(, .); = new DrawableElement(, .);
if (._接続 != null) if (._接続 != null)
{ {
Sort(._接続.Select((Element e) => e.EnumEle()).JoinEnum(), ); Sort(._接続.Select((Element e) => e.EnumEle()).JoinEnum(), );
@@ -4917,7 +4917,7 @@ namespace SlaveMatrix
{ {
Inserts(item23.UpperArm, 0, item23.UpperArm.); Inserts(item23.UpperArm, 0, item23.UpperArm.);
Inserts(item23., -2, item23..); Inserts(item23., -2, item23..);
Inserts(item23.., 1, new DE(item23., item23..)); Inserts(item23.., 1, new DrawableElement(item23., item23..));
} }
ele4 = .GetEle<>(); ele4 = .GetEle<>();
if (ele4 != null) if (ele4 != null)
@@ -4928,100 +4928,100 @@ namespace SlaveMatrix
{ {
if (item24.LowerArm != null) if (item24.LowerArm != null)
{ {
Inserts(item24.LowerArm, 1 + ((item24.LowerArm._接続 != null) ? item24.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0) + ((item24.LowerArm._接続 != null) ? item24.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DE(item24.LowerArm, item24.LowerArm.)); Inserts(item24.LowerArm, 1 + ((item24.LowerArm._接続 != null) ? item24.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0) + ((item24.LowerArm._接続 != null) ? item24.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DrawableElement(item24.LowerArm, item24.LowerArm.));
} }
} }
foreach (Arm人 item25 in Arm人右) foreach (Arm人 item25 in Arm人右)
{ {
if (item25.LowerArm != null) if (item25.LowerArm != null)
{ {
Inserts(item25.LowerArm, 1 + ((item25.LowerArm._接続 != null) ? item25.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0) + ((item25.LowerArm._接続 != null) ? item25.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DE(item25.LowerArm, item25.LowerArm.)); Inserts(item25.LowerArm, 1 + ((item25.LowerArm._接続 != null) ? item25.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0) + ((item25.LowerArm._接続 != null) ? item25.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DrawableElement(item25.LowerArm, item25.LowerArm.));
} }
} }
foreach (Arm翼鳥 item26 in ) foreach (Arm翼鳥 item26 in )
{ {
if (item26.LowerArm != null) if (item26.LowerArm != null)
{ {
Inserts(item26.LowerArm, 1 + ((item26.LowerArm._接続 != null) ? item26.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DE(item26.LowerArm, item26.LowerArm.)); Inserts(item26.LowerArm, 1 + ((item26.LowerArm._接続 != null) ? item26.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DrawableElement(item26.LowerArm, item26.LowerArm.));
} }
} }
foreach ( item27 in ) foreach ( item27 in )
{ {
if (item27.LowerArm != null) if (item27.LowerArm != null)
{ {
Inserts(item27.LowerArm, 1 + ((item27.LowerArm._接続 != null) ? item27.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DE(item27.LowerArm, item27.LowerArm.)); Inserts(item27.LowerArm, 1 + ((item27.LowerArm._接続 != null) ? item27.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DrawableElement(item27.LowerArm, item27.LowerArm.));
} }
} }
foreach (Arm翼鳥 item28 in ) foreach (Arm翼鳥 item28 in )
{ {
if (item28.LowerArm != null) if (item28.LowerArm != null)
{ {
Inserts(item28.LowerArm, 1 + ((item28.LowerArm._接続 != null) ? item28.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DE(item28.LowerArm, item28.LowerArm.)); Inserts(item28.LowerArm, 1 + ((item28.LowerArm._接続 != null) ? item28.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DrawableElement(item28.LowerArm, item28.LowerArm.));
} }
} }
foreach ( item29 in ) foreach ( item29 in )
{ {
if (item29.LowerArm != null) if (item29.LowerArm != null)
{ {
Inserts(item29.LowerArm, 1 + ((item29.LowerArm._接続 != null) ? item29.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DE(item29.LowerArm, item29.LowerArm.)); Inserts(item29.LowerArm, 1 + ((item29.LowerArm._接続 != null) ? item29.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DrawableElement(item29.LowerArm, item29.LowerArm.));
} }
} }
foreach (Arm翼獣 item30 in ) foreach (Arm翼獣 item30 in )
{ {
if (item30.LowerArm != null) if (item30.LowerArm != null)
{ {
Inserts(item30.LowerArm, 1 + ((item30.LowerArm._接続 != null) ? item30.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DE(item30.LowerArm, item30.LowerArm.)); Inserts(item30.LowerArm, 1 + ((item30.LowerArm._接続 != null) ? item30.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DrawableElement(item30.LowerArm, item30.LowerArm.));
} }
} }
foreach ( item31 in ) foreach ( item31 in )
{ {
if (item31.LowerArm != null) if (item31.LowerArm != null)
{ {
Inserts(item31.LowerArm, 1 + ((item31.LowerArm._接続 != null) ? item31.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DE(item31.LowerArm, item31.LowerArm.)); Inserts(item31.LowerArm, 1 + ((item31.LowerArm._接続 != null) ? item31.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DrawableElement(item31.LowerArm, item31.LowerArm.));
} }
} }
foreach (Arm翼獣 item32 in ) foreach (Arm翼獣 item32 in )
{ {
if (item32.LowerArm != null) if (item32.LowerArm != null)
{ {
Inserts(item32.LowerArm, 1 + ((item32.LowerArm._接続 != null) ? item32.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DE(item32.LowerArm, item32.LowerArm.)); Inserts(item32.LowerArm, 1 + ((item32.LowerArm._接続 != null) ? item32.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DrawableElement(item32.LowerArm, item32.LowerArm.));
} }
} }
foreach ( item33 in ) foreach ( item33 in )
{ {
if (item33.LowerArm != null) if (item33.LowerArm != null)
{ {
Inserts(item33.LowerArm, 1 + ((item33.LowerArm._接続 != null) ? item33.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DE(item33.LowerArm, item33.LowerArm.)); Inserts(item33.LowerArm, 1 + ((item33.LowerArm._接続 != null) ? item33.LowerArm._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DrawableElement(item33.LowerArm, item33.LowerArm.));
} }
} }
foreach ( item34 in ) foreach ( item34 in )
{ {
if (item34.Leg != null) if (item34.Leg != null)
{ {
Inserts(item34.Leg, 1 + ((item34.Leg._接続 != null) ? item34.Leg._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DE(item34.Leg, item34.Leg.)); Inserts(item34.Leg, 1 + ((item34.Leg._接続 != null) ? item34.Leg._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DrawableElement(item34.Leg, item34.Leg.));
} }
} }
foreach ( item35 in ) foreach ( item35 in )
{ {
if (item35.Leg != null) if (item35.Leg != null)
{ {
Inserts(item35.Leg, 1 + ((item35.Leg._接続 != null) ? item35.Leg._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DE(item35.Leg, item35.Leg.)); Inserts(item35.Leg, 1 + ((item35.Leg._接続 != null) ? item35.Leg._接続.Select((Element f) => f.EnumEle()).JoinEnum().Count() : 0), new DrawableElement(item35.Leg, item35.Leg.));
} }
} }
foreach ( item36 in ) foreach ( item36 in )
{ {
if (item36. != null) if (item36. != null)
{ {
Inserts(item36., -1, new DE(item36., item36..)); Inserts(item36., -1, new DrawableElement(item36., item36..));
Inserts(item36., 2, new DE(item36., item36..)); Inserts(item36., 2, new DrawableElement(item36., item36..));
} }
} }
foreach ( item37 in ) foreach ( item37 in )
{ {
if (item37. != null) if (item37. != null)
{ {
Inserts(item37., -1, new DE(item37., item37..)); Inserts(item37., -1, new DrawableElement(item37., item37..));
Inserts(item37., 2, new DE(item37., item37..)); Inserts(item37., 2, new DrawableElement(item37., item37..));
} }
} }
foreach ( e in ) foreach ( e in )
@@ -5053,7 +5053,7 @@ namespace SlaveMatrix
} }
foreach (Element item39 in ) foreach (Element item39 in )
{ {
if (hashSet.Contains(item39) || (item39 is DE && ((DE)item39).Par is _蝙)) if (hashSet.Contains(item39) || (item39 is DrawableElement && ((DrawableElement)item39).Par is _蝙))
{ {
.Add(item39); .Add(item39);
} }
@@ -5083,7 +5083,7 @@ namespace SlaveMatrix
} }
foreach (Element item43 in ) foreach (Element item43 in )
{ {
if (hashSet.Contains(item43) || (item43 is DE && ((DE)item43).Par is _蝙)) if (hashSet.Contains(item43) || (item43 is DrawableElement && ((DrawableElement)item43).Par is _蝙))
{ {
.Add(item43); .Add(item43);
} }