Esempio n. 1
0
        public Rocket(PointF location, Force force, Acceleration acceleration, Speed speed,
                      Angle angle, float thrustPercentage, RocketInformation rocketInf) : base(location, new Mass(rocketInf.Weight), force, acceleration, speed, rocketInf.DragProperties)
        {
            _angle            = angle;
            targetAngle       = angle;
            _rocketInf        = rocketInf;
            _thrustPercentage = thrustPercentage;
            _restFuelWeight   = rocketInf.FuelWeight;
            _sprite           = rocketInf.GetRocketSprite();
            _engineRunning    = true;

            lastCheck = TimeKeeper.Now();

            var rnd = new Random();
            var r   = rnd.Next(rocketInf.Names.Count);

            _name = rocketInf.Names[r];
        }
Esempio n. 2
0
        public static Rocket getEmptyRocket()
        {
            var angle = Angle.Zero;

            return(new Rocket(new PointF(0, 0), new Force(angle, 0), new Acceleration(angle, 0), new Speed(angle, 0), angle, 0, RocketInformation.LoadFromName("empty-rocket")));
        }