コード例 #1
0
        private void showSkillList(Player player)
        {
            vlSkills.remove(vlSkills.Children.ToArray());

            TextItem textItem = new TextItem("Move", font);

            textItem.setPosition(vlSkills.X, vlSkills.Y);
            if (moveCost > player.AP)
            {
                textItem.Color = Color.Gray;                      // TODO not really needed anymore
            }
            vlSkills.add(textItem);
            player.Abilities.Sort((a1, a2) => a1.APCost.CompareTo(a2.APCost)); // order needs to be sync with order in vlist
            player.Abilities.ForEach(a => {
                textItem = new TextItem(a.Title, font);
                textItem.setPosition(vlSkills.X, vlSkills.Y);
                if (a.APCost > player.AP)
                {
                    textItem.Color = Color.Gray;
                }
                vlSkills.add(textItem);
            });

            vlSkills.select(0);
            vlSkills.IsFocused = true;
            skillPane.AlphaMod = 1;
            skillPane.Scale    = 1;
        }