Exemplo n.º 1
0
        public Asteroid(float x, float y, uint right, uint bottom)
            : base(x, y, right, bottom)
        {
            vel.X   = FP.Rand(100) * FP.Choose(1, -1);
            vel.Y   = FP.Rand(100) * FP.Choose(1, -1);
            rot     = FP.Random * (float)90 * FP.Choose(1, -1);
            health += (((Height = Width = (sizeMod = (int)FP.Rand((uint)posSizeMod)) + size) - size) / posSizeMod) * health;
            var AsteroidImage = new Image(Library.GetTexture("Asteroid.png"));

            Graphic = image = AsteroidImage;
            CenterOrigin();
            image.CenterOO();
            Type = "Asteroid";
        }