Exemple #1
0
 public UnitRecord(UnitRecord unitRecord, StackId stackId)
 {
     Id             = unitRecord.Id;
     UnitTypeId     = unitRecord.UnitTypeId;
     StackId        = stackId;
     MovementPoints = unitRecord.MovementPoints;
 }
Exemple #2
0
            public void StackIdShouldDeserialize(
                string stackId
                )
            {
                var source = $@"""StackId={stackId}""";
                var result = JsonSerializer.Deserialize <CloudFormationStackEvent>(source);

                result !.StackId.Should().Be(stackId);
            }
Exemple #3
0
        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);
        }