예제 #1
0
 void Update()
 {
     if (coli != null)
     {
         if (Program.InputGetMouseButtonDown_0)
         {
             if (Program.pointedCollider == coli)
             {
                 ((CardDescription)(Program.I().cardDescription)).setData(YGOSharp.CardsManager.Get(code), GameTextureManager.myBack, "", true);
             }
         }
     }
     if (Program.I().deckManager != null)
     {
         if (loaded_code != code)
         {
             Texture2D t = GameTextureManager.get(code, GameTextureType.card_picture, defaults);
             if (t != null)
             {
                 uiTexture.mainTexture = t;
                 uiTexture.aspectRatio = ((float)t.width) / ((float)t.height);
                 uiTexture.forceWidth((int)(uiTexture.height * uiTexture.aspectRatio));
                 loaded_code    = code;
                 loaded_banlist = null;
             }
         }
         if (loaded_banlist != Program.I().deckManager.currentBanlist)
         {
             loaded_banlist = Program.I().deckManager.currentBanlist;
             if (ico != null)
             {
                 if (loaded_banlist == null)
                 {
                     ico.show(3);
                     return;
                 }
                 ico.show(loaded_banlist.GetQuantity(code));
             }
             if (ico_ot != null)
             {
                 //[1: OCG]、[2: TCG]、[3: OCG&TCG]、[4: Anime]
                 if (data.Ot == 2 || data.Ot == 4)
                 {
                     ico_ot.show(data.Ot);
                     return;
                 }
                 ico_ot.show(3);
             }
         }
     }
 }
예제 #2
0
 void Update()
 {
     if (loadedPicCode != cardData.Id)
     {
         Texture2D pic = GameTextureManager.get(cardData.Id, GameTextureType.card_picture);
         if (pic != null)
         {
             loadedPicCode = cardData.Id;
             gameObject.transform.Find("face").GetComponent <Renderer>().material.mainTexture = pic;
         }
     }
     if (Program.I().deckManager.currentBanlist != loaded_banlist)
     {
         ban_icon    ico    = GetComponentInChildren <ban_icon>();
         ban_icon_ot ico_ot = GetComponentInChildren <ban_icon_ot>();
         loaded_banlist = Program.I().deckManager.currentBanlist;
         if (loaded_banlist != null)
         {
             ico.show(loaded_banlist.GetQuantity(cardData.Id));
         }
         else
         {
             ico.show(3);
         }
         ico_ot.show(cardData.Ot);
     }
     if (isDraging)
     {
         gameObject.transform.position += (getGoodPosition(4) - gameObject.transform.position) * 0.3f;
     }
     if (Vector3.Distance(Vector3.zero, gameObject.transform.position) > 50 && bool_physicalON)
     {
         killIt();
     }
 }