コード例 #1
0
ファイル: CardsManager.cs プロジェクト: Tic-Tac-Toc/windbot
        private static void InitCards(IDataReader reader)
        {
            while (reader.Read())
            {
                int id = reader.GetInt32(0);
                CardData card = new CardData(id)
                {
                    AliasId = reader.GetInt32(1),
                    Type = reader.GetInt32(2),
                    Level = reader.GetInt32(3) & 0xFF,
                    Race = reader.GetInt32(4),
                    Attribute = reader.GetInt32(5),
                    Atk = reader.GetInt32(6),
                    Def = reader.GetInt32(7),
                    Name = reader.GetString(8),
                    Description = reader.GetString(9)
                };
                _cards.Add(id, card);

            }
        }
コード例 #2
0
ファイル: Deck.cs プロジェクト: Tic-Tac-Toc/windbot
 private void AddCard(CardData card)
 {
     if (card.IsExtraCard())
         ExtraCards.Add(card);
     else
         Cards.Add(card);
 }