public UsedItemSprite(Vector2 location) { usedItemSpriteSheet = ItemSpriteTextureStorage.CreateUsedItemSprite(); this.location = location; usedItemSprite = new AnimatedSprite(usedItemSpriteSheet, UtilityClass.one, UtilityClass.one, location, UtilityClass.one); collisionRectangle = new Rectangle(UtilityClass.zero, UtilityClass.zero, UtilityClass.zero, UtilityClass.zero); }
public void Update() { if (raiseAndFall > UtilityClass.brickPiecesRise) { int newY = (int)location.Y; newY--; int newX = (int)location.X; if (moveLeftOrRight) { newX--; } else { newX++; } location = new Vector2(newX, newY); raiseAndFall--; } else if (raiseAndFall > UtilityClass.zero) { int newY = (int)location.Y; newY++; location = new Vector2(location.X, newY); raiseAndFall--; } else { brickPiecesSpriteSheet = ItemSpriteTextureStorage.CreateUsedItemSprite(); } if (frame == totalFrames) { frame = UtilityClass.zero; } else { frame++; } }