Beispiel #1
0
 public void btnCoinClick()
 {
     LayerCoin.SetActive(true);
     LayerItem.SetActive(false);
     btnItem.GetComponent <Image>().sprite = itemLayerOff;
     btnCoin.GetComponent <Image>().sprite = coinLayerOn;
     iTween.ScaleTo(btnItem.gameObject, scaleCurrent, 0.5f);
     iTween.ScaleTo(btnCoin.gameObject, scaleClick, 0.5f);
 }
Beispiel #2
0
 void Start()
 {
     parent            = gameObject;
     layerShopControll = this;
     btnCloseLayer.onClick.AddListener(() => btnClose());
     btnItem.onClick.AddListener(() => btnItemClick());
     btnCoin.onClick.AddListener(() => btnCoinClick());
     LayerItem.SetActive(true);
     LayerCoin.SetActive(false);
     itemLayerOn  = Resources.Load <Sprite>("Textures/GameMap/item shop/btnItemOn");
     itemLayerOff = Resources.Load <Sprite>("Textures/GameMap/item shop/btnItemOff");
     coinLayerOn  = Resources.Load <Sprite>("Textures/GameMap/item shop/btnCoinOn");
     coinLayerOff = Resources.Load <Sprite>("Textures/GameMap/item shop/btnCoinOff");
     btnItem.GetComponent <Image>().sprite = itemLayerOn;
     btnCoin.GetComponent <Image>().sprite = coinLayerOff;
     iTween.ScaleTo(btnItem.gameObject, scaleClick, 0.5f);
 }