예제 #1
0
파일: Ship.cs 프로젝트: andy-uq/Echo
        public Ship(ShipBlueprint blueprint)
            : this()
        {
            Owner = blueprint.Owner;
            SetHardPoints(blueprint.HardPoints);
            Speed = blueprint.Speed;

            stats = new ShipStatistics(blueprint.Stats);
        }
예제 #2
0
파일: Manufacture.cs 프로젝트: andy-uq/Echo
        public void BuildShip()
        {
            var universe = new Universe();
            var corp = new Corporation { Location = universe };
            var shipYard = new MockShipYard(universe, corp);

            var shipBlueprint = new ShipBlueprint {HardPoints = new[] {HardPoint.FactoryHardPoint(HardPointPosition.Front),}, BuildCost = 10, Speed = 20d, Location = shipYard, Owner = corp };
            shipBlueprint.Materials = new List<Material> {new Material(RefinedOre.RefinedOreID, "Refined Ore", 500)};
            shipBlueprint.Stats[ShipStatistic.HullIntegrity].SetValue(1000);
            shipBlueprint.Stats[ShipStatistic.Speed].SetValue(20);

            shipYard.Build(shipBlueprint);

            ulong tick = 0L;
            while ( shipYard.Ships.Count == 0 )
            {
                shipYard.Tick(tick);
                tick++;
            }
        }