diff --git a/iOS.meta b/iOS.meta deleted file mode 100644 index 97ef8cb2..00000000 --- a/iOS.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bad4fa5e5d4eb4cacb76dd1446af3d84 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_frame_coin.png b/popcorn/Assets/MyGame/Resource/UI/ui_frame_coin.png index 71f9b82d..149f8ded 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_frame_coin.png and b/popcorn/Assets/MyGame/Resource/UI/ui_frame_coin.png differ diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_frame_coinget.png b/popcorn/Assets/MyGame/Resource/UI/ui_frame_coinget.png index 149f8ded..71f9b82d 100644 Binary files a/popcorn/Assets/MyGame/Resource/UI/ui_frame_coinget.png and b/popcorn/Assets/MyGame/Resource/UI/ui_frame_coinget.png differ diff --git a/popcorn/Assets/MyGame/Resource/UI/ui_frame_coinget.png.meta b/popcorn/Assets/MyGame/Resource/UI/ui_frame_coinget.png.meta index ab03acd0..4088f96c 100644 --- a/popcorn/Assets/MyGame/Resource/UI/ui_frame_coinget.png.meta +++ b/popcorn/Assets/MyGame/Resource/UI/ui_frame_coinget.png.meta @@ -46,7 +46,7 @@ TextureImporter: alignment: 0 spritePivot: {x: 0.5, y: 0.5} spritePixelsToUnits: 100 - spriteBorder: {x: 27, y: 24, z: 26, w: 21} + spriteBorder: {x: 47, y: 26, z: 84, w: 21} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 alphaIsTransparency: 1 diff --git a/popcorn/Assets/MyGame/Scenes/Main/Prefabs/UI/Header.prefab b/popcorn/Assets/MyGame/Scenes/Main/Prefabs/UI/Header.prefab index 85eedf0e..5e90f556 100644 --- a/popcorn/Assets/MyGame/Scenes/Main/Prefabs/UI/Header.prefab +++ b/popcorn/Assets/MyGame/Scenes/Main/Prefabs/UI/Header.prefab @@ -519,7 +519,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: 12345 + m_Text: '12 ' --- !u!1 &137127163584464918 GameObject: m_ObjectHideFlags: 0 @@ -991,7 +991,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: ff4d597826f53ac49821fc3d60148965, type: 3} + m_Sprite: {fileID: 21300000, guid: 582b70d53a85e4e74be0fb9ca6be120c, type: 3} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 diff --git a/popcorn/Assets/MyGame/Scenes/Main/WatchMovieCoinGet.unity b/popcorn/Assets/MyGame/Scenes/Main/WatchMovieCoinGet.unity index 9491ae3f..70b9e0b8 100644 --- a/popcorn/Assets/MyGame/Scenes/Main/WatchMovieCoinGet.unity +++ b/popcorn/Assets/MyGame/Scenes/Main/WatchMovieCoinGet.unity @@ -393,7 +393,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 582b70d53a85e4e74be0fb9ca6be120c, type: 3} + m_Sprite: {fileID: 21300000, guid: ff4d597826f53ac49821fc3d60148965, type: 3} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 diff --git a/popcorn/Assets/MyGame/Scenes/shopping/Scripts/ShopHeaderTabView.cs b/popcorn/Assets/MyGame/Scenes/shopping/Scripts/ShopHeaderTabView.cs index 9e9dd56d..d9c49792 100644 --- a/popcorn/Assets/MyGame/Scenes/shopping/Scripts/ShopHeaderTabView.cs +++ b/popcorn/Assets/MyGame/Scenes/shopping/Scripts/ShopHeaderTabView.cs @@ -44,7 +44,7 @@ public class ShopHeaderTabView : MonoBehaviour if (null!= freshSale) { GameDataManager.sale = GameDataManager.GetTimeStamp(dateTime) + JoypacUtils.OnlineParametersIntByJoypacSDK(StaticOnlineParams.SaleVideoTime); - freshSale(true); + freshSale(false); } }); diff --git a/popcorn/Assets/MyGame/Scenes/shopping/Scripts/ShopItemView.cs b/popcorn/Assets/MyGame/Scenes/shopping/Scripts/ShopItemView.cs index a4484b42..7e65ac77 100644 --- a/popcorn/Assets/MyGame/Scenes/shopping/Scripts/ShopItemView.cs +++ b/popcorn/Assets/MyGame/Scenes/shopping/Scripts/ShopItemView.cs @@ -48,10 +48,18 @@ public class ShopItemView : MonoBehaviour nomalPrice = shopData.price>nomalPrice?shopData.price:nomalPrice; shopData.price = (int)(nomalPrice * 0.8f); } - else if(nomalPrice!=-1&&GameDataManager.sale<= dateNowTime) + else if (sale) + { + nomalPrice = shopData.price > nomalPrice ? shopData.price : nomalPrice; + shopData.price = (int)(nomalPrice * 0.8f); + } + else if (nomalPrice != -1 && GameDataManager.sale < dateNowTime) { shopData.price = nomalPrice; } + + + if (shopData.id == 14 ) { shopData.price = 1; @@ -99,8 +107,17 @@ public class ShopItemView : MonoBehaviour onObject.SetActive(shopData.price <= GameDataManager.GameData.adCount); offObject.SetActive(!onObject.activeSelf); + if ((shopData.id == 14|| shopData.id == 15) && GetItemAmount(shopData) > 0) + { + progressText.text = string.Format(ProgressFormat, "1", "1"); - if (shopData.id == 14) + progressBar.value = Mathf.InverseLerp(0, shopData.price, 1); + videoButton.gameObject.SetActive(false); + onObject.SetActive(false); + offObject.SetActive(false); + soldOutObject.SetActive(true); + } + else if (shopData.id == 14) { progressText.text = string.Format(ProgressFormat, CryptoPrefs.GetInt("ShowButterDialog", 0), "1"); @@ -109,7 +126,7 @@ public class ShopItemView : MonoBehaviour offObject.SetActive(false); soldOutObject.SetActive(true); } - if (shopData.id == 15) + else if(shopData.id == 15 ) { progressText.text = string.Format(ProgressFormat, CryptoPrefs.GetInt("ShowStrawBerryDialog", 0), "1"); @@ -151,7 +168,21 @@ public class ShopItemView : MonoBehaviour } } - + private int GetItemAmount(ShopData shopData) + { + var gameData = GameDataManager.GameData; + switch (shopData.Category) + { + case ItemCategory.Material: + return gameData.Material.Find(data => data.Id == shopData.itemId)?.Amount ?? 0; + case ItemCategory.Recipe: + return gameData.MyRecipes.Contains(shopData.itemId) ? 1 : 0; + case ItemCategory.Pan: + return gameData.Pans.Contains(shopData.itemId) ? 1 : 0; + default: + throw new ArgumentOutOfRangeException(); + } + } public void SetStockCount(int stock) {