Example #1
0
    // Use this for initialization
    void Start()
    {
        _mainView = this.GetComponent <UIPanel>().ui;

        _onecard = (OneCard)_mainView.GetChild("n0");
        _onecard.onClick.Add(__clickCard);
    }
Example #2
0
        public void GiveCard(Gamer gamer, List <OneCard> cardDeck)
        {
            OneCard someCard = CardDeckService.GetSomeCard(cardDeck);

            gamer.PlayersCard.Add(someCard);
            var historyHelperService = new HistoryHelperService();

            historyHelperService.AddGameHistory(StaticCardHistoryList.History, gamer, someCard);
            int cardPoints = DictionaryOfCardPoints.CardPointDict[someCard.CardNumber];

            gamer.Points += cardPoints;
        }
Example #3
0
        public void AddGameHistory(List <CardHistory> historyList, Gamer gamer, OneCard oneCard)
        {
            var newRecord = new CardHistory(gamer.Name, gamer.Points, oneCard);

            historyList.Add(newRecord);
        }
Example #4
0
    void __clickCard(EventContext context)
    {
        OneCard card = (OneCard)context.sender;

        card.Turn();
    }