public ActionResult Create(Card card, FormCollection form) { string cardID = card.CardID; string cardName = card.CardName; string cardCategory = form["Card Category"].ToString(); card.CardCategory = cardCategory; string cardType = form["Card Type"].ToString(); card.CardType = cardType; string monsterType = form["Monster Type"].ToString(); card.MonsterType = monsterType; string monsterSubType = form["Monster Sub-Type"].ToString(); card.MonsterSubType = monsterSubType; string monsterAttribute = form["Monster Attribute"].ToString(); card.MonsterAttribute = monsterAttribute; int levelRank = card.LevelRank; int atk = card.Attack; int def = card.Defense; int penScale = card.PendulumScale; int linkNumber = card.LinkNumber; string banlistPlacement = form["Banlist Placement"].ToString(); card.BanlistPlacement = banlistPlacement; string cardText = card.CardText; try { cardManager.AddNewCard(card); } catch (Exception ex) { return(View("Create")); } return(RedirectToAction("Index")); }
public void CardChoosed(GameObject card) { IsChoosingCard = false; ChooseCardWidget.ChooseFinish(); playerCardManager.AddNewCard(card); }