public void InsertCard(VMEODIngredientCard card) { Cards.Insert(CardRandom.Next(Cards.Count + 1), card); }
public void P_Hand(string evt, string txt) { var buttons = new UIButton[] { btnIngredient1, btnIngredient2, btnIngredient3 }; var split = txt.Split('\n'); for (int i = 0; i < 3; i++) { Texture2D tex = null; int btnFrame = 0; string caption = ""; if (split[i] != "--") { var card = new VMEODIngredientCard(split[i]); switch (card.Type) { case VMEODIngredientType.Anchovies: tex = imageAnchovies; break; case VMEODIngredientType.Cheese: tex = imageCheese; break; case VMEODIngredientType.Dough: tex = imageDough; break; case VMEODIngredientType.Mushrooms: tex = imageMushrooms; break; case VMEODIngredientType.Pepperoni: tex = imagePepperoni; break; case VMEODIngredientType.Sauce: tex = imageSauce; break; } btnFrame = (2 - ((int)card.Size)); caption = GetIngredientName(card); } if (tex == null) buttons[i].Visible = false; else { buttons[i].Texture = tex; buttons[i].Visible = true; buttons[i].ButtonFrame = btnFrame; buttons[i].Tooltip = caption; } } }
public void InsertCard(VMEODIngredientCard card) { Cards.Insert(CardRandom.Next(Cards.Count+1), card); }
public string GetIngredientName(VMEODIngredientCard card) { if (card == null) return Script.GetString("strNoContributor"); var prefix = GameFacade.Strings.GetString("204", (10-(int)card.Size).ToString()); int suffixN = 7; switch (card.Type) { case VMEODIngredientType.Dough: suffixN = 3; break; case VMEODIngredientType.Sauce: suffixN = 6; break; case VMEODIngredientType.Cheese: suffixN = 2; break; case VMEODIngredientType.Anchovies: suffixN = 1; break; case VMEODIngredientType.Mushrooms: suffixN = 4; break; case VMEODIngredientType.Pepperoni: suffixN = 5; break; } var suffix = GameFacade.Strings.GetString("204", suffixN.ToString()); return prefix + suffix; }