Пример #1
0
 public JewelCart(Vector2 startPosition) : base("spr_jewelcart")
 {
     Position        = startPosition;
     startX          = startPosition.X;
     glitters        = new GlitterField(sprite, 40, new Rectangle(275, 470, 430, 85));
     glitters.Parent = this;
 }
Пример #2
0
        public Jewel() : base("spr_jewels")
        {
            ColorType  = ExtendedGame.Random.Next(3);
            ShapeType  = ExtendedGame.Random.Next(3);
            NumberType = ExtendedGame.Random.Next(3);

            int index = 9 * ColorType + 3 * ShapeType + NumberType;

            spriteRectangle = new Rectangle(index * sprite.Height, 0, sprite.Height, sprite.Height);

            TargetPosition = Vector2.Zero;

            glitters          = new GlitterField(sprite, 2, spriteRectangle);
            glitters.Parent   = this;
            glitters.Position = -spriteRectangle.Location.ToVector2();
        }