public UnitRecord(UnitRecord unitRecord, StackId stackId) { Id = unitRecord.Id; UnitTypeId = unitRecord.UnitTypeId; StackId = stackId; MovementPoints = unitRecord.MovementPoints; }
public void StackIdShouldDeserialize( string stackId ) { var source = $@"""StackId={stackId}"""; var result = JsonSerializer.Deserialize <CloudFormationStackEvent>(source); result !.StackId.Should().Be(stackId); }
public UnitRecord(int unitId, int stackId) { Id = GameDataSequences.GetNextSequence("Unit"); UnitTypeId = new UnitTypeId(unitId); StackId = new StackId(stackId); var gameConfigCache = CallContext <GameConfigCache> .GetData("GameConfigCache"); var unit = gameConfigCache.GetUnitConfigById(unitId); MovementPoints = new MovementPoints((float)unit.MovementPoints); }