Beispiel #1
0
 public Shop(string shopName)
 {
     this.rec.Width /= 8;
     this.rec.Height /= 8;
     this.pigRec = new Rectangle(this.rec.X + 20, this.rec.Y + 12, 0x54, 0x44);
     this.nameRec = new Rectangle(this.rec.X + 20, this.rec.Y + 0x5c, 0x58, 0x10);
     this.priceRec = new Rectangle(this.rec.X + 20, this.rec.Y + 0x84, 0x58, 40);
     this.itemRec = new Rectangle(this.rec.X + 120, this.rec.Y + 8, 0x80, 0x9c);
     this.pigRecBox = new Box(this.pigRec, this.shopTexture);
     this.nameBox = new Box(this.nameRec, this.shopTexture);
     this.itemBox = new Box(this.itemRec, this.shopTexture);
     this.priceBox = new Box(this.priceRec, this.shopTexture);
     this.priceBorder = new Border(new int[] { -1, -2, -9, -2, -9 }, new Point(this.priceRec.X + 14, this.priceRec.Y + 12), this.shopTexture);
     this.name = new GameText("SHOPPING");
     this.name.Shadow = true;
     this.name.Location = (PointF) new Point(this.nameRec.X + 6, this.nameRec.Y + 6);
     this.price = new GameText("PRICE");
     this.price.Location = (PointF) new Point(this.priceRec.X + 6, this.priceRec.Y + 6);
     this.price.Shadow = true;
     this.priceVal = new GameText("0000");
     this.priceVal.Location = (PointF) new Point(this.priceRec.X + 0x10, this.priceRec.Y + 0x16);
     this.priceVal.Shadow = true;
     this.LoadShop(shopName);
 }
Beispiel #2
0
 private void SetSize(Rectangle sizeRec)
 {
     this.rec = sizeRec;
     this.location = new Point((GameEngine.ScreenWidth - (this.rec.Width * 8)) / 2, (GameEngine.ScreenHeight - (this.rec.Height * 8)) / 2);
     this.border = new Border(new int[] { -this.rec.Width / 2, -this.rec.Height, -this.rec.Width, -this.rec.Height, -((this.rec.Width / 2) + 1) }, new Point((this.location.X + ((this.rec.Width * 8) / 2)) - 4, this.location.Y - 4), this.backTexture);
 }