Пример #1
0
    public void directFlightButtonClicked()
    {
        driveButton.GetComponent <Button>().interactable         = false;
        directFlightButton.GetComponent <Button>().interactable  = false;
        charterFlightButton.GetComponent <Button>().interactable = false;
        shuttleFlightButton.GetComponent <Button>().interactable = false;
        currentPlayer = game.getCurrentPlayer();
        City currentCity        = playerToMove.getPlayerPawn().getCity();
        List <PlayerCard> cards = currentPlayer.getHand();

        foreach (PlayerCard card in cards)
        {
            if (card.getType() == CardType.CityCard)
            {
                CityCard aCard = (CityCard)card;
                City     city  = aCard.getCity();
                if (city != currentCity)
                {
                    city.displayButton();
                }
            }
        }

        moveStatus = Status.DIRECTFLIGHT;
    }
Пример #2
0
 public CityCard getCard(City c)
 {
     foreach (PlayerCard card in handCard)
     {
         if (card.getType() == CardType.CityCard)
         {
             CityCard aCard = (CityCard)card;
             if (aCard.getCity() == c)
             {
                 return(aCard);
             }
         }
     }
     return(null);
 }
Пример #3
0
 public bool containsSpecificCityCard(City c)
 {
     foreach (PlayerCard card in handCard)
     {
         if (card.getType() == CardType.CityCard)
         {
             CityCard aCityCard = (CityCard)card;
             if (aCityCard.getCity() == c)
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Пример #4
0
 public void giveCard(Player p1, Player p2, CityCard card)
 {
     displayRecord(p1.getRoleKind().ToString() + " gave the City Card: " + card.getCity().getCityName().ToString() + " to " + p2.getRoleKind().ToString());
 }
Пример #5
0
 public void takeCard(Player p1, Player p2, CityCard card)
 {
     displayRecord(p1.getRoleKind().ToString() + " took the City Card: " + card.getCity().getCityName().ToString() + " from " + p2.getRoleKind().ToString());
 }