Esempio n. 1
0
        private void DrawLander()
        {
            foreach (Vector2 v2 in LanderValues.FillLanderLines())
            {
                float Xrotated = center.X + (v2.X - center.X) *
                                 (float)Math.Cos(rotation) - (v2.Y - center.Y) *
                                 (float)Math.Sin(rotation);

                float Yrotated = center.Y + (v2.X - center.X) *
                                 (float)Math.Sin(rotation) + (v2.Y - center.Y) *
                                 (float)Math.Cos(rotation);

                pb.AddVertex((new Vector2(Xrotated, Yrotated) * scale) + position, Color.White);//Color of the lander
            }
        }
Esempio n. 2
0
        public Lander(Game game) : base(game)
        {
            RandomLanderPos();
            landerCords = LanderValues.FillLanderLines();

            this.pb = GlobalValues.PrimitiveBatch;

            showRocket1            = false;
            showRocket2            = false;
            rotationMatrix         = new Matrix();
            currentLanderDirection = new Vector2();
            isThrusting            = false;

            scale            = 2.0f;
            center           = new Vector2(5.5f, 4.5f);
            particleConstant = LanderValues.ParticleConstant;

            thrustPower           = 0.0f;
            thrustPowerIncrement  = 0.1f; //Needs adjustment
            gravityConstant       = MOON_GRAVITY;
            gravityPull           = gravityConstant;
            LanderValues.Velocity = new Vector2();
        }