예제 #1
0
 public void InsertCard(VMEODIngredientCard card)
 {
     Cards.Insert(CardRandom.Next(Cards.Count + 1), card);
 }
예제 #2
0
        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;
                }
            }
        }
예제 #3
0
 public void InsertCard(VMEODIngredientCard card)
 {
     Cards.Insert(CardRandom.Next(Cards.Count+1), card);
 }
예제 #4
0
        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;
        }