예제 #1
0
    public void setStarCard(Color aColor)
    {
        NumberCard tPrefab = Resources.Load <NumberCard>("prefab/game/numberCard");

        mCard1 = GameObject.Instantiate <NumberCard>(tPrefab);
        mCard1.mPattern.color  = aColor;
        mCard1.mPattern.sprite = Resources.Load <Sprite>("image/card/card_star");
        mCard1.transform.SetParent(this.transform, false);
        mCard1.position = new Vector3(0, 0, 0);
        mCard1.showBack();
    }
예제 #2
0
    public void setNumberCards(Color aColor)
    {
        mText.text = "0";
        NumberCard tPrefab = Resources.Load <NumberCard>("prefab/game/numberCard");

        mCard1 = GameObject.Instantiate <NumberCard>(tPrefab);
        mCard2 = GameObject.Instantiate <NumberCard>(tPrefab);
        mCard3 = GameObject.Instantiate <NumberCard>(tPrefab);
        mCard1.mPattern.color  = aColor;
        mCard2.mPattern.color  = aColor;
        mCard3.mPattern.color  = aColor;
        mCard1.mPattern.sprite = Resources.Load <Sprite>("image/card/card_meet");
        mCard2.mPattern.sprite = Resources.Load <Sprite>("image/card/card_fruits");
        mCard3.mPattern.sprite = Resources.Load <Sprite>("image/card/card_fish");
        mCard1.transform.SetParent(this.transform, false);
        mCard2.transform.SetParent(this.transform, false);
        mCard3.transform.SetParent(this.transform, false);
        mCard1.position = new Vector3(-1.5f, 0, 0);
        mCard2.position = new Vector3(0, 0, 0);
        mCard3.position = new Vector3(1.5f, 0, 0);
        mCard1.showBack();
        mCard2.showBack();
        mCard3.showBack();
    }