Example #1
0
 public void addinfo(Stone tempcard)
 {
     cards.Add(tempcard);
     tempcard.transform.parent = transform;
     tempcard.layering(false);
     if (cards.Count == 1)
         tempcard.turnit(false);
     else
         tempcard.hideit();
 }
Example #2
0
    void checkthetaken(Transform obj)
    {
        if (obj.tag == "places")
        {
            OkeyPlace tempholder = obj.GetComponent<OkeyPlace>();
            if (tempholder.card)
            {
                holdedcard = tempholder.card;
                holdedcard.layering(true);
                print("takenfromboard");
            }
            return;
        }

        if (canplay)
        {
            if (!taken)
            {
                if (obj == engine.sides[0].transform && engine.sides[0].cards.Count > 0)
                {

                    OkeySides tempholder = obj.GetComponent<OkeySides>();
                    holdedcard = tempholder.cards[tempholder.cards.Count - 1];
                    holdedcard.layering(true);

                    print("takenfromside");
                    return;
                }
                else if (obj == engine.middle.transform)
                {

                    OkeyMiddleholder tempholder = obj.GetComponent<OkeyMiddleholder>();
                    holdedcard = tempholder.cards[tempholder.cards.Count - 1];
                    holdedcard.back.renderer.enabled = true;
                    holdedcard.layering(true);

                    print("takenfrommiddle");
                    return;
                }
            }
        }
    }