Exemplo n.º 1
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();
     }
 }