27 lines
710 B
C#
27 lines
710 B
C#
using Godot;
|
|
using Nocturnis.Enigmos.Modules.ComputationalModules;
|
|
using Nocturnis.Enigmos.Ports;
|
|
using Nocturnis.GlobalManagement.Constants;
|
|
using Skeleton.DataStructure;
|
|
|
|
namespace Enigmos.Modules.ComputationalModules.Unary;
|
|
|
|
public abstract partial class LogicalNegationModule : UnaryComputationalModule, IDuplicateOutputModule
|
|
{
|
|
public override void Init()
|
|
{
|
|
base.Init();
|
|
this.DataOutInit("Output", 1);
|
|
this.SetInputType(EnigmosConstant.DataPortTypes.Bit);
|
|
this.SetOutputType(EnigmosConstant.DataPortTypes.Bit);
|
|
PostInit();
|
|
}
|
|
|
|
public override void Define()
|
|
{
|
|
(object, StringName) Func(CacheItem cache) => (!this.X(cache).Bit, EnigmosConstant.DataPortTypes.Bit);
|
|
this.Define(Func);
|
|
}
|
|
}
|
|
|