Beispiel #1
0
 protected Card(Game game, int id, CardType type, CardSuit suit, CardRank rank)
 {
     this.game = game;
     this.id = id;
     this.type = type;
     this.suit = suit;
     this.rank = rank;
     color = GetColor(type);
     empty = new EmptyCard(this);
 }
    void RotateCardClockWise()
    {
        // rotate the card for the first time when clicked
//		Debug.Log ("Rotating the card clockwise XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
        Quaternion initRotation = Card.transform.rotation;

        Card.transform.rotation *= Quaternion.Euler(0f, 5f, 0f);

        if (Card.transform.rotation == Quaternion.Euler(0f, 90f, 0f))
        {
            Card.GetComponent <Image> ().sprite = EmptyCard.GetComponent <Image> ().sprite;
            //CardText.SetActive (true);
            LocalCard = Instantiate(Cards [CardNumber]) as GameObject;

            LocalCard.transform.SetParent(Card.transform, false);
        }
        if (Card.transform.rotation == Quaternion.Euler(0f, 180f, 0f))
        {
            isRotate  = false;
            isFlipped = true;
            isZoom    = true;
            //	StartCoroutine (ZoomEffect());
        }
    }
        public CardComponentCS()
        {
            InitializeComponent();

            BindingContext = new EmptyCard();
        }