Upgrade
This commit is contained in:
@@ -9,7 +9,11 @@ using Nocturnis.GlobalManagement.Providers;
|
||||
|
||||
namespace Enigmos.Modules.TerminalModules;
|
||||
|
||||
public abstract partial class MemoryModule : BaseModule, ITerminalModule, ISourceModule, IDuplicateOutputModule
|
||||
public abstract partial class MemoryModule : BaseModule,
|
||||
ITerminalModule,
|
||||
ISourceModule,
|
||||
IDuplicateOutputModule,
|
||||
IPolymorphismModule
|
||||
{
|
||||
private DataVariable? Memory { get; set; }
|
||||
private IDataPortGroup? MemoryPortGroup { get; set; }
|
||||
|
||||
@@ -6,11 +6,11 @@ namespace Enigmos.Modules.TerminalModules.TestingModules;
|
||||
|
||||
public partial class R2Reader : Control
|
||||
{
|
||||
private AnimatedSprite2D? Direction { get; set; }
|
||||
private AnimatedSprite2D? Magnitude { get; set; }
|
||||
public R2? UnderlyingVector { get; set; }
|
||||
private double TargetPhase() => Math.Atan2(UnderlyingVector![2], UnderlyingVector![1]);
|
||||
private double TargetLength() => UnderlyingVector!.Magnitude;
|
||||
private AnimatedSprite2D Direction { get; set; }
|
||||
private AnimatedSprite2D Magnitude { get; set; }
|
||||
public R2 UnderlyingVector { get; set; }
|
||||
private double TargetPhase() => UnderlyingVector == null ? 0: Math.Atan2(UnderlyingVector![2], UnderlyingVector![1]);
|
||||
private double TargetLength() => UnderlyingVector?.Magnitude ?? 0;
|
||||
|
||||
private int TargetPhaseFrame =>
|
||||
Mathf.FloorToInt((TargetPhase() % (2d * Math.PI) + 2d * Math.PI) % (2d * Math.PI) * 44d / (2d * Math.PI));
|
||||
|
||||
Reference in New Issue
Block a user