public void PayDown() { UseDown(); shopBinder.AddDownIndex(index); Debug.Log("Center Index : " + index); Debug.Log("Current Index : " + shopBinder.GetDownIndex()); centerItem.SetShopItemState(ShopItemState.Unlocked); uiBinder.PayWithCoin(centerItem.Data.extraData.basicData.requirement); indicatorController.Apply(); }
// Start is called before the first frame update void Start() { shopBinder = GetComponentInParent <ShopDataBinder>(); Sprite[] sprites = ItemSpawner.LoadSprites(topPath); topVisual.SetVisual(sprites[shopBinder.GetTopIndex()]); Debug.Log("Top : " + shopBinder.GetTopIndex()); sprites = ItemSpawner.LoadSprites(frontPath); frontVisual.SetVisual(sprites[shopBinder.GetFrontIndex()]); sprites = ItemSpawner.LoadSprites(downPath); downVisual.SetVisual(sprites[shopBinder.GetDownIndex()]); Debug.Log("Down : " + shopBinder.GetDownIndex()); sprites = null; GC.Collect(); }