public DrinkInfo(JsonNode json) { this.menuDrinkId = json["menu_drink_id"].Get <int>(); this.language = (SessionManager.Language)json["language"].Get <int>(); json = json["drink"]; this.minDegree = json["min_degree"].Get <int>(); this.maxDegree = json["max_degree"].Get <int>(); this.imageUrl = json["image_url"].Get <string>(); this.shopUrl = json["shop_url"].Get <string>(); this.primaryName = json["primary_name"].Get <string>(); this.names = new string[json["names"].Count]; for (int i = 0; i < this.names.Length; i++) { this.names[i] = json["names"][i].Get <string>(); } this.taste = json["taste"].Get <string>(); this.description = json["description"].Get <string>(); this.recipe = json["recipe"].Get <string>(); this.color = json["color"].Get <string>(); this.location = json["location"].Get <string>(); this.company = json["company"].Get <string>(); this.technique = new Technique(json["technique"]); this.glass = new Glass(json["grass"]); this.drinkBase = new DrinkBase(json["base"]); this.category = new Category(json["category"]); this.source = new Source(json["source"]); this.compornents = new Compornent[json["compornents"].Count]; for (int i = 0; i < this.compornents.Length; i++) { this.compornents[i] = new Compornent(json["compornents"][i]); } }
public MenuImageDrinkInfo(JsonNode json) { this.menuDrinkId = json["menu_drink_id"].Get <int>(); this.drinkNames = new string[] { json["drink_names"][0].Get <string>(), json["drink_names"][1].Get <string>(), json["drink_names"][2].Get <string>() }; this.topLeft = new Vector2(json["points"][0].Get <float>(), json["points"][1].Get <float>()); this.bottomRight = new Vector2(json["points"][2].Get <float>(), json["points"][3].Get <float>()); this.language = (SessionManager.Language)json["language"].Get <int>(); }
void SetLanguage(SessionManager.Language language) { PlayerData.selectedLanguage = language; Reload(); }