static public Accumulation.IShipUiModuleAndContext AsAccuInstant( this MemoryStruct.IShipUiModule module, MemoryStruct.IShipUi shipUi) => new ShipUiModuleAndContext() { Module = module, Location = module?.PositionInShipUi(shipUi), };
public ShipUi(MemoryStruct.IShipUi raw) { Raw = raw; Indication = Raw?.Indication?.ParseAsShipUiIndication(); SpeedMilliParsed = Raw?.SpeedLabel?.Text?.RegexMatchIfSuccess("(" + Number.DefaultNumberFormatRegexPatternAllowLeadingAndTrailingChars + @")\s*m/s")?.Groups[1]?.Value?.NumberParseDecimalMilli(); }
static public Vektor2DInt?PositionInShipUi( this MemoryStruct.IShipUiModule Module, MemoryStruct.IShipUi ShipUi) => Module?.RegionCenter() - ShipUi?.Center?.RegionCenter();
static public IShipUi Parse(this MemoryStruct.IShipUi raw) => null == raw ? null : new ShipUi(raw);