Upgrade structure of code base
This commit is contained in:
140
Modules/ProgrammableModules/FilterModule.cs
Normal file
140
Modules/ProgrammableModules/FilterModule.cs
Normal file
@@ -0,0 +1,140 @@
|
||||
using Enigmos.Boards;
|
||||
using Enigmos.Exceptions;
|
||||
using Enigmos.Modules.ControllingModules;
|
||||
using Enigmos.Modules.InterlayerModules;
|
||||
using Enigmos.Modules.Other;
|
||||
using Enigmos.Ports.DataPorts;
|
||||
using Nocturnis.DataStructures;
|
||||
using Nocturnis.DataStructures.DataPortGroups;
|
||||
using Nocturnis.Enigmos.Modules;
|
||||
using Nocturnis.Enigmos.Modules.InterlayerModules;
|
||||
using Nocturnis.Enigmos.Ports;
|
||||
using Nocturnis.Enigmos.Ports.DataPorts;
|
||||
using Nocturnis.Enigmos.Ports.DataPorts.Directions;
|
||||
using Nocturnis.GlobalManagement.Constants;
|
||||
using Nocturnis.GlobalManagement.Providers;
|
||||
|
||||
namespace Enigmos.Modules.ProgrammableModules;
|
||||
|
||||
public partial class FilterModule : ProgrammableModule, IPolymorphismModule, IFilterModule
|
||||
{
|
||||
|
||||
private IDataInPort? Input { get; set; }
|
||||
private IInterlayerDataInModule[] ExplicitInputs { get; set; } = Array.Empty<IInterlayerDataInModule>();
|
||||
private FilterOutputModule? Output { get; set; }
|
||||
private IterativeOutputModule? IterativeOutput { get; set; }
|
||||
private IndicateInputModule? Indicate { get; set; }
|
||||
private IDataPortGroup[] InterLayerGroups { get; set; } = Array.Empty<IDataPortGroup>();
|
||||
private IDataPortGroup? ArrayGroup { get; set; }
|
||||
private bool FilterEnded { get; set; }
|
||||
private IData[] CachedInputArray { get; set; } = Array.Empty<IData>();
|
||||
public IData[] CachedResult { get; set; } = Array.Empty<IData>();
|
||||
|
||||
private List<IData> CachedListResult { get; set; } = new();
|
||||
|
||||
//private List<IData> CachedResult { get; set; } = new();
|
||||
private int CachedIndex { get; set; }
|
||||
|
||||
public new FilterModuleBoard UnderlyingBoard
|
||||
{
|
||||
get => (base.UnderlyingBoard as FilterModuleBoard)!;
|
||||
set => base.UnderlyingBoard = value;
|
||||
}
|
||||
|
||||
public override IEnumerable<IBasePort> Ports => new[] { Input! };
|
||||
|
||||
public override IBaseModule[] SubModules() => ExplicitInputs.Union<IBaseModule>(new[] { Output! }).ToArray();
|
||||
|
||||
public override IEnumerable<IBasePort> ExplicitPorts =>
|
||||
new IBasePort[] { Output!.Output! }
|
||||
.Union(ExplicitInputs.Select(c => c.DataIn))!
|
||||
.ToArray<IBasePort>();
|
||||
|
||||
public override IEnumerable<IBasePort> ImplicitPorts =>
|
||||
new IBasePort[] { IterativeOutput!.Output!, Indicate!.Input! }
|
||||
.Union(UnderlyingBoard.Outputs.Select(c => c.DataOut))
|
||||
.ToArray()!;
|
||||
|
||||
public HashSet<IDataPortGroup> ConfigurablePortGroups { get; set; } = new();
|
||||
|
||||
public void Inference() => IterativeOutput!.Output!
|
||||
.SetDataType(GlobalProvider.DataStructureProvider!.ArrayToElement(ArrayGroup!.SelectedType));
|
||||
|
||||
|
||||
public void Filter()
|
||||
{
|
||||
if (FilterEnded)
|
||||
{
|
||||
CachedInputArray = Input!.GetData.Get!.Array;
|
||||
CachedIndex = 0;
|
||||
CachedListResult = new List<IData>();
|
||||
}
|
||||
|
||||
while (CachedIndex < CachedInputArray.Length)
|
||||
{
|
||||
SoftReset();
|
||||
IterativeOutput!.Output!.OutData.UpdateCalculation(cache =>
|
||||
(CachedInputArray[CachedIndex].Data, IterativeOutput.Output.DataType)!);
|
||||
IterativeOutput.Output.OutData.Expire();
|
||||
if(Indicate!.Input!.GetData.Get!.Bit)
|
||||
CachedListResult.Add(CachedInputArray[CachedIndex]);
|
||||
CachedIndex += 1;
|
||||
}
|
||||
|
||||
CachedResult = CachedListResult.ToArray();
|
||||
FilterEnded = true;
|
||||
}
|
||||
|
||||
private void SoftReset() => UnderlyingBoard.Reset();
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
base.Init();
|
||||
UnderlyingBoard = GlobalProvider.SceneProvider!
|
||||
.AssetMapper<FilterModuleBoard>()
|
||||
.Instantiate<FilterModuleBoard>();
|
||||
UnderlyingBoard.Init();
|
||||
ExplicitInputs = new InterlayerDataInModule[3];
|
||||
InterLayerGroups = new IDataPortGroup[3];
|
||||
IterativeOutput = UnderlyingBoard.IterativeOutput;
|
||||
IterativeOutput.Output.SetDataType(EnigmosConstant.DataPortTypes.Real);
|
||||
Indicate = UnderlyingBoard.Indicate;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
ExplicitInputs[i] = GetModule<InterlayerDataInModule>($"EI{i + 1}");
|
||||
ExplicitInputs[i].DualModule = UnderlyingBoard.Outputs[i];
|
||||
UnderlyingBoard.Outputs[i].DualModule = ExplicitInputs[i];
|
||||
}
|
||||
|
||||
FilterEnded = true;
|
||||
|
||||
Input = this.GetPort<DataInPort>("Input");
|
||||
Output = GetModule<FilterOutputModule>("Output");
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
InterLayerGroups[i] = GlobalProvider.DataStructureProvider.NewDataPortGroup(
|
||||
this,
|
||||
new IDataPort[] { ExplicitInputs[i].DataIn, UnderlyingBoard.Outputs[i].DataOut },
|
||||
$"Exterior In -> Interior Out{i}",
|
||||
EnigmosConstant.DataPortTypes.Real,
|
||||
EnigmosConstant.DataPortTypes.AnyType
|
||||
);
|
||||
ExplicitInputs[i].Board = Board;
|
||||
}
|
||||
|
||||
ArrayGroup = GlobalProvider.DataStructureProvider!.NewDataPortGroup(
|
||||
this,
|
||||
new IDataPort[] { Input, Output.Output! },
|
||||
"Array Type",
|
||||
EnigmosConstant.DataPortTypes.RealArray,
|
||||
EnigmosConstant.DataPortTypes.AnyArray
|
||||
);
|
||||
|
||||
ConfigurablePortGroups = InterLayerGroups.Union(new[] { ArrayGroup }).ToHashSet();
|
||||
|
||||
PostInit();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
111
Modules/ProgrammableModules/FunctionModule.cs
Normal file
111
Modules/ProgrammableModules/FunctionModule.cs
Normal file
@@ -0,0 +1,111 @@
|
||||
using Enigmos.Boards;
|
||||
using Enigmos.Modules.InterlayerModules;
|
||||
using Godot;
|
||||
using Nocturnis.DataStructures.DataPortGroups;
|
||||
using Nocturnis.Enigmos.Modules;
|
||||
using Nocturnis.Enigmos.Ports;
|
||||
using Nocturnis.Enigmos.Ports.DataPorts;
|
||||
using Nocturnis.GlobalManagement.Constants;
|
||||
using Nocturnis.GlobalManagement.Providers;
|
||||
|
||||
namespace Enigmos.Modules.ProgrammableModules;
|
||||
public partial class FunctionModule : ProgrammableModule, IPolymorphismModule
|
||||
{
|
||||
private IDataPortGroup[] ExteriorToInterior { get; set; } = Array.Empty<IDataPortGroup>();
|
||||
private IDataPortGroup[] InteriorToExterior { get; set; } = Array.Empty<IDataPortGroup>();
|
||||
public void Inference(){}
|
||||
public HashSet<IDataPortGroup> ConfigurablePortGroups { get; set; } = new();
|
||||
|
||||
public override IEnumerable<IBasePort> ExplicitPorts =>
|
||||
ExplicitDataInModules
|
||||
.SelectMany(module => module.Ports)
|
||||
.Union(ExplicitDataOutModules.SelectMany(module => module.Ports))
|
||||
.Union(ExplicitSignalInModules.SelectMany(module => module.Ports))
|
||||
.Union(ExplicitSignalOutModules.SelectMany(module => module.Ports));
|
||||
|
||||
public override IEnumerable<IBasePort> ImplicitPorts =>
|
||||
UnderlyingBoard.DataIns
|
||||
.SelectMany(module => module.Ports)
|
||||
.Union(UnderlyingBoard.DataOuts.SelectMany(module => module.Ports))
|
||||
.Union(UnderlyingBoard.SignalIns.SelectMany(module => module.Ports))
|
||||
.Union(UnderlyingBoard.SignalOuts.SelectMany(module => module.Ports));
|
||||
|
||||
|
||||
private static readonly PackedScene FunctionModuleBoardScene = GlobalProvider.SceneProvider!
|
||||
.AssetMapper<FunctionModuleBoard>();
|
||||
|
||||
public override BaseModule[] SubModules() =>
|
||||
ExplicitDataInModules
|
||||
.Union<BaseModule>(ExplicitDataOutModules)
|
||||
.Union(ExplicitSignalInModules)
|
||||
.Union(ExplicitSignalOutModules)
|
||||
.ToArray();
|
||||
|
||||
private InterlayerDataInModule[] ExplicitDataInModules { get; set; } = Array.Empty<InterlayerDataInModule>();
|
||||
private InterlayerDataOutModule[] ExplicitDataOutModules { get; set; } = Array.Empty<InterlayerDataOutModule>();
|
||||
private InterlayerSignalInModule[] ExplicitSignalInModules { get; set; } = Array.Empty<InterlayerSignalInModule>();
|
||||
|
||||
private InterlayerSignalOutModule[] ExplicitSignalOutModules { get; set; } =
|
||||
Array.Empty<InterlayerSignalOutModule>();
|
||||
|
||||
protected new FunctionModuleBoard UnderlyingBoard
|
||||
{
|
||||
get => (base.UnderlyingBoard as FunctionModuleBoard)!;
|
||||
set => base.UnderlyingBoard = value;
|
||||
}
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
UnderlyingBoard = FunctionModuleBoardScene.Instantiate<FunctionModuleBoard>();
|
||||
UnderlyingBoard.Init();
|
||||
ExteriorToInterior = new IDataPortGroup[4];
|
||||
InteriorToExterior = new IDataPortGroup[4];
|
||||
ExplicitDataInModules = new InterlayerDataInModule[4];
|
||||
ExplicitDataOutModules = new InterlayerDataOutModule[4];
|
||||
ExplicitSignalInModules = new InterlayerSignalInModule[4];
|
||||
ExplicitSignalOutModules = new InterlayerSignalOutModule[4];
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
ExplicitDataInModules[i] = GetModule<InterlayerDataInModule>($"EI{i + 1}");
|
||||
ExplicitDataOutModules[i] = GetModule<InterlayerDataOutModule>($"EO{i + 1}");
|
||||
ExplicitSignalInModules[i] = GetModule<InterlayerSignalInModule>($"ESI{i + 1}");
|
||||
ExplicitSignalOutModules[i] = GetModule<InterlayerSignalOutModule>($"ESO{i + 1}");
|
||||
|
||||
ExplicitDataInModules[i].DualModule = UnderlyingBoard.DataOuts[i];
|
||||
ExplicitDataOutModules[i].DualModule = UnderlyingBoard.DataIns[i];
|
||||
ExplicitSignalInModules[i].DualModule = UnderlyingBoard.SignalOuts[i];
|
||||
ExplicitSignalOutModules[i].DualModule = UnderlyingBoard.SignalIns[i];
|
||||
|
||||
UnderlyingBoard.DataOuts[i].DualModule = ExplicitDataInModules[i];
|
||||
UnderlyingBoard.DataIns[i].DualModule = ExplicitDataOutModules[i];
|
||||
UnderlyingBoard.SignalOuts[i].DualModule = ExplicitSignalInModules[i];
|
||||
UnderlyingBoard.SignalIns[i].DualModule = ExplicitSignalOutModules[i];
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
ExteriorToInterior[i] = GlobalProvider.DataStructureProvider!.NewDataPortGroup(
|
||||
this,
|
||||
new IDataPort[] { ExplicitDataInModules[i].DataIn, UnderlyingBoard.DataOuts[i].DataOut },
|
||||
$"Exterior In -> Interior Out{i + 1}",
|
||||
EnigmosConstant.DataPortTypes.Real,
|
||||
EnigmosConstant.DataPortTypes.AnyType
|
||||
);
|
||||
InteriorToExterior[i] = GlobalProvider.DataStructureProvider.NewDataPortGroup(
|
||||
this,
|
||||
new IDataPort[] { UnderlyingBoard.DataIns[i].DataIn, ExplicitDataOutModules[i].DataOut },
|
||||
$"Interior In -> Exterior Out{i + 1}",
|
||||
EnigmosConstant.DataPortTypes.Real,
|
||||
EnigmosConstant.DataPortTypes.AnyType
|
||||
);
|
||||
}
|
||||
|
||||
ConfigurablePortGroups = ExteriorToInterior.Union(InteriorToExterior).ToHashSet();
|
||||
PostInit();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
186
Modules/ProgrammableModules/OptimizationModule.cs
Normal file
186
Modules/ProgrammableModules/OptimizationModule.cs
Normal file
@@ -0,0 +1,186 @@
|
||||
using Enigmos.Boards;
|
||||
using Enigmos.Exceptions;
|
||||
using Enigmos.Modules.ControllingModules;
|
||||
using Enigmos.Modules.InterlayerModules;
|
||||
using Enigmos.Ports;
|
||||
using Enigmos.Ports.DataPorts;
|
||||
using Godot;
|
||||
using Nocturnis.DataStructures;
|
||||
using Nocturnis.DataStructures.ConfigurableParameters;
|
||||
using Nocturnis.DataStructures.DataPortGroups;
|
||||
using Nocturnis.Enigmos.Modules;
|
||||
using Nocturnis.Enigmos.Ports;
|
||||
using Nocturnis.Enigmos.Ports.DataPorts;
|
||||
using Nocturnis.Enigmos.Ports.DataPorts.Directions;
|
||||
using Nocturnis.GlobalManagement.Constants;
|
||||
using Nocturnis.GlobalManagement.Providers;
|
||||
|
||||
namespace Enigmos.Modules.ProgrammableModules;
|
||||
|
||||
public partial class OptimizationModule : ProgrammableModule,
|
||||
IPolymorphismModule,
|
||||
IParameterizedModule,
|
||||
IOptimizationModule
|
||||
{
|
||||
private bool OptimizationEnded { get; set; }
|
||||
private double? CachedOptimizeValue { get; set; }
|
||||
public IDataInPort? InternalIterOut { get; set; }
|
||||
public IDataOutPort? InternalArrayIn { get; set; }
|
||||
|
||||
public IData CachedResult { get; set; } =
|
||||
GlobalProvider.DataStructureProvider!.NewData(0, EnigmosConstant.DataPortTypes.Null);
|
||||
|
||||
private IData[] CachedInput { get; set; } = Array.Empty<IData>();
|
||||
private int ProcessingIndex { get; set; }
|
||||
|
||||
private IBoolParameter? UsingMax { get; set; }
|
||||
private IDataPortGroup[] InterlayerGroups { get; set; } = Array.Empty<IDataPortGroup>();
|
||||
private IDataPortGroup? OptimizationGroup { get; set; }
|
||||
private DataInPort? ArrayInput { get; set; }
|
||||
private InterlayerDataInModule[] ExplicitInputs { get; set; } = Array.Empty<InterlayerDataInModule>();
|
||||
private OptimizationItemOutputModule? ItemOut { get; set; }
|
||||
private OptimizationValueOutputModule? ValueOut { get; set; }
|
||||
|
||||
public override IEnumerable<IBasePort> Ports => new[] { ArrayInput! };
|
||||
|
||||
public new OptimizationModuleBoard UnderlyingBoard
|
||||
{
|
||||
get => (base.UnderlyingBoard as OptimizationModuleBoard)!;
|
||||
set => base.UnderlyingBoard = value;
|
||||
}
|
||||
|
||||
public HashSet<IConfigurableParameter> ConfigurableParameters { get; set; } = new();
|
||||
public HashSet<IDataPortGroup> ConfigurablePortGroups { get; set; } = new();
|
||||
|
||||
public override IEnumerable<IBasePort> ExplicitPorts =>
|
||||
new IBasePort[] { ItemOut!.DataOut, ValueOut!.DataOut! }
|
||||
.Union<IBasePort>(ExplicitInputs.Select(c => c.DataIn)!);
|
||||
|
||||
public override BaseModule[] SubModules() =>
|
||||
ExplicitInputs
|
||||
.Union(new BaseModule[] { ItemOut, ValueOut })
|
||||
.ToArray();
|
||||
|
||||
public override IEnumerable<IBasePort> ImplicitPorts =>
|
||||
new IBasePort[] { UnderlyingBoard.IterOut.Output, UnderlyingBoard.ValueIn.DataIn }
|
||||
.Union(UnderlyingBoard.ImplicitDataOuts.Select(c => c.DataOut));
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
base.Init();
|
||||
UnderlyingBoard = GlobalProvider.SceneProvider!
|
||||
.AssetMapper<OptimizationModuleBoard>()
|
||||
.Instantiate<OptimizationModuleBoard>();
|
||||
UnderlyingBoard.Init();
|
||||
InterlayerGroups = new IDataPortGroup[3];
|
||||
ExplicitInputs = new InterlayerDataInModule[3];
|
||||
InternalIterOut = this.GetPort<IDataInPort>("InternalIterOut");
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
ExplicitInputs[i] = GetModule<InterlayerDataInModule>($"EI{i + 1}");
|
||||
ExplicitInputs[i].DualModule = UnderlyingBoard.ImplicitDataOuts[i];
|
||||
UnderlyingBoard.ImplicitDataOuts[i].DualModule = ExplicitInputs[i];
|
||||
}
|
||||
|
||||
OptimizationEnded = true;
|
||||
CachedInput = Array.Empty<IData>();
|
||||
//CachedArray = Array.Empty<DataPackage>();
|
||||
ProcessingIndex = 0;
|
||||
CachedResult = GlobalProvider.DataStructureProvider!.NullData;
|
||||
CachedOptimizeValue = null;
|
||||
|
||||
ArrayInput = this.GetPort<DataInPort>("ArrayInput");
|
||||
ItemOut = GetModule<OptimizationItemOutputModule>("ItemOut");
|
||||
ValueOut = GetModule<OptimizationValueOutputModule>("ValueOut");
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
InterlayerGroups[i] = GlobalProvider.DataStructureProvider.NewDataPortGroup(
|
||||
this,
|
||||
new IDataPort[] { ExplicitInputs[i].DataIn!, UnderlyingBoard.ImplicitDataOuts[i].DataOut! },
|
||||
$"Exterior In -> Interior Out{i}",
|
||||
EnigmosConstant.DataPortTypes.Real,
|
||||
EnigmosConstant.DataPortTypes.AnyType
|
||||
);
|
||||
ExplicitInputs[i].Board = Board;
|
||||
}
|
||||
|
||||
OptimizationGroup = GlobalProvider.DataStructureProvider.NewDataPortGroup(
|
||||
this,
|
||||
new IDataPort[] { ArrayInput },
|
||||
"Array Input Type",
|
||||
EnigmosConstant.DataPortTypes.AnyArrayType,
|
||||
EnigmosConstant.DataPortTypes.AnyArray
|
||||
);
|
||||
UsingMax = GlobalProvider.DataStructureProvider.NewBoolParameter(
|
||||
"Method",
|
||||
"Max",
|
||||
"Min",
|
||||
true
|
||||
);
|
||||
ItemOut.DataOut.SetDataType(EnigmosConstant.DataPortTypes.Real);
|
||||
ValueOut.DataOut!.SetDataType(EnigmosConstant.DataPortTypes.Real);
|
||||
ConfigurableParameters = new HashSet<IConfigurableParameter> { UsingMax };
|
||||
ConfigurablePortGroups =
|
||||
InterlayerGroups.Union(new[] { OptimizationGroup }).ToHashSet();
|
||||
PostInit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void Inference()
|
||||
{
|
||||
StringName elementType = GlobalProvider.DataPackageTypeProvider!.ToElement(OptimizationGroup!.SelectedType);
|
||||
ItemOut!.DataOut.SetDataType(elementType);
|
||||
UnderlyingBoard.IterOut!.Output!.SetDataType(elementType);
|
||||
}
|
||||
|
||||
private void SoftReset() => UnderlyingBoard.Reset();
|
||||
|
||||
public void Optimize()
|
||||
{
|
||||
if (OptimizationEnded)
|
||||
{
|
||||
CachedOptimizeValue = null;
|
||||
CachedInput = InternalArrayIn!.OutData.Get!.Array;
|
||||
CachedResult = GlobalProvider.DataStructureProvider.NewData(0, EnigmosConstant.DataPortTypes.Null);
|
||||
ProcessingIndex = 0;
|
||||
}
|
||||
|
||||
while (ProcessingIndex < CachedInput.Length)
|
||||
{
|
||||
SoftReset();
|
||||
UnderlyingBoard.IterOut!.Output!.OutData.UpdateCalculation(
|
||||
cache =>
|
||||
(CachedInput[ProcessingIndex].Data, CachedInput[ProcessingIndex].Type)!
|
||||
);
|
||||
UnderlyingBoard.IterOut.Output.OutData.Expire();
|
||||
double currentValue = UnderlyingBoard.ValueIn!.DataIn!.GetData.Get!.Double;
|
||||
IData currentOut = InternalIterOut!.GetData.Get!;
|
||||
if (UsingMax!.ParameterValue)
|
||||
{
|
||||
if (CachedOptimizeValue == null || (CachedOptimizeValue < currentValue))
|
||||
{
|
||||
CachedOptimizeValue = currentValue;
|
||||
CachedResult.Assign(currentOut.Data!, currentOut.Type!);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CachedOptimizeValue == null || CachedOptimizeValue > currentValue)
|
||||
{
|
||||
CachedOptimizeValue = currentValue;
|
||||
CachedResult.Assign(currentOut.Data!, currentOut.Type!);
|
||||
}
|
||||
}
|
||||
ProcessingIndex++;
|
||||
|
||||
}
|
||||
ValueOut!.Define();
|
||||
OptimizationEnded = true;
|
||||
}
|
||||
|
||||
public bool Calculated { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
using Enigmos.Boards;
|
||||
using Enigmos.Ports;
|
||||
using Nocturnis.Enigmos.Modules;
|
||||
using TabulaSmaragdina;
|
||||
using Nocturnis.Enigmos.Modules.InterlayerModules;
|
||||
using Nocturnis.Enigmos.Ports;
|
||||
using Nocturnis.GlobalManagement.Providers;
|
||||
|
||||
namespace Enigmos.Modules.ProgrammableModules;
|
||||
|
||||
public abstract partial class ProgrammableModule : BaseModule, ICompositeModule, IProgrammableModule
|
||||
{
|
||||
public BaseBoard UnderlyingBoard { get; set; }
|
||||
public BaseBoard? UnderlyingBoard { get; set; }
|
||||
public abstract IBaseModule[] SubModules();
|
||||
public void EnterProgrammableBoard() => GlobalProvider.SceneProvider.RootScene.ChangeScene(UnderlyingBoard);
|
||||
public abstract IEnumerable<BasePort> ExplicitPorts();
|
||||
public abstract IEnumerable<BasePort> ImplicitPorts();
|
||||
public void EnterProgrammableBoard() => GlobalProvider.SceneProvider!.RootScene.ChangeScene(UnderlyingBoard!);
|
||||
public abstract IEnumerable<IBasePort> ExplicitPorts { get; }
|
||||
public abstract IEnumerable<IBasePort> ImplicitPorts { get; }
|
||||
public override void UpdateCables()
|
||||
{
|
||||
foreach (BasePort port in ExplicitPorts())
|
||||
foreach (IBasePort port in ExplicitPorts)
|
||||
{
|
||||
if(!Board.CablePairing.ContainsKey(port) )
|
||||
if(!Board!.CablePairing.ContainsKey(port) )
|
||||
continue;
|
||||
Board.CablePairing[port].LineUpdate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user