コード例 #1
0
 public virtual void Init(CardSoot soot, int cardNo, bool isShowFront = false)
 {
     this.soot        = soot;
     this.cardNo      = cardNo;
     this.isShowFront = isShowFront;
     this.frontSpr    = ResourceManager.Instance.GetSprite(soot, cardNo);
     gameObject.SetActive(true);
     // position の調整は PhotonManager.Init 方で行ってください
 }
コード例 #2
0
    public Sprite GetSprite(CardSoot soot, int cardNo)
    {
        Sprite[] array = new Sprite[0];
        switch (soot)
        {
        case CardSoot.Spade:   array = spadeSprites; break;

        case CardSoot.Heart:   array = heartSprites; break;

        case CardSoot.Diamond: array = diamondSprites; break;

        case CardSoot.Clover:  array = cloverSprites; break;

        case CardSoot.Joker:  return(jokerSprite);

        default: Debug.LogError("Soot がおかしい"); break;
        }
        return(array[cardNo - 1]);
    }