在线参数控制自动爆米花时间等级

This commit is contained in:
xiaohui.wang 2022-04-25 16:10:13 +08:00
parent 1f77ee6558
commit a3fc679984
11 changed files with 174 additions and 37 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: adea02802c985422abf1c64fbb244d13
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -62,4 +62,16 @@
/// </summary>
public static JoypacOnlineParam SaleVideoTime = new JoypacOnlineParam("SaleVideoTime", "120");
/// <summary>
/// 自动爆米花制作时间
/// </summary>
public static JoypacOnlineParam AutoCookTime = new JoypacOnlineParam("AutoCookTime", "3");
/// <summary>
/// 自动爆米花解锁等级
/// </summary>
public static JoypacOnlineParam AutoCookLevel= new JoypacOnlineParam("AutoCookLevel", "3");
}

View File

@ -82,6 +82,12 @@ public class DynamicStringsKey
#endif
public string IssuePerson_APP_ID = "347981";
public string IssuePerson_APP_NAME = "小鸡兄弟的爆米花店铺";
}

View File

@ -1,6 +1,6 @@
public static partial class StaticStringsURLScheme
{
public static string MyURLSchemes = "JPCAQUA";
public static string MyURLSchemes = "rangersapplog.d09845b9f40839f1";
public static URLSchemes[] URLSchemesJoypac = {
new URLSchemes ("subaru3", "JPCZHZHP"),

View File

@ -904,6 +904,8 @@ GameObject:
- component: {fileID: 3658417434859902284}
- component: {fileID: 3658417434859902286}
- component: {fileID: 3658417434859902287}
- component: {fileID: 8821329971063369651}
- component: {fileID: 5148375473933004238}
m_Layer: 5
m_Name: Button_off
m_TagString: Untagged
@ -953,7 +955,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
@ -968,6 +970,65 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &8821329971063369651
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3658417434859902285}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 3658417434859902287}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &5148375473933004238
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3658417434859902285}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5e732834936f04d48be0ff3fa358563d, type: 3}
m_Name:
m_EditorClassIdentifier:
onClickPlaySEFilename: se_ButtonTap
randomPlaySEFilenames: []
randomPlayVoiceFilenames: []
vibrationType: 0
--- !u!1 &3658417435631091039
GameObject:
m_ObjectHideFlags: 0
@ -1746,7 +1807,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
cookingButton: {fileID: 3658417434522814400}
disabledObject: {fileID: 3658417434859902285}
disabledObject: {fileID: 8821329971063369651}
cookedObject: {fileID: 2679656543278342664}
perfectCookedObject: {fileID: 3658417434568161586}
rarityView: {fileID: 5676996117682643677}
@ -2485,9 +2546,27 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2c82036225f2d453cac3ff9fb07fae4d, type: 3}
--- !u!224 &5676996117682643678 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 592905858299255810, guid: 2c82036225f2d453cac3ff9fb07fae4d,
--- !u!1 &5676996119271212837 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 592905859906714105, guid: 2c82036225f2d453cac3ff9fb07fae4d,
type: 3}
m_PrefabInstance: {fileID: 5112378705130438364}
m_PrefabAsset: {fileID: 0}
--- !u!1 &5676996118944887893 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 592905859427273353, guid: 2c82036225f2d453cac3ff9fb07fae4d,
type: 3}
m_PrefabInstance: {fileID: 5112378705130438364}
m_PrefabAsset: {fileID: 0}
--- !u!1 &5676996118073317159 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 592905858709072379, guid: 2c82036225f2d453cac3ff9fb07fae4d,
type: 3}
m_PrefabInstance: {fileID: 5112378705130438364}
m_PrefabAsset: {fileID: 0}
--- !u!1 &5676996117785711383 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 592905858270211531, guid: 2c82036225f2d453cac3ff9fb07fae4d,
type: 3}
m_PrefabInstance: {fileID: 5112378705130438364}
m_PrefabAsset: {fileID: 0}
@ -2503,27 +2582,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 01738374a494495b82539c6ff39c1a3a, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &5676996117785711383 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 592905858270211531, guid: 2c82036225f2d453cac3ff9fb07fae4d,
type: 3}
m_PrefabInstance: {fileID: 5112378705130438364}
m_PrefabAsset: {fileID: 0}
--- !u!1 &5676996118073317159 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 592905858709072379, guid: 2c82036225f2d453cac3ff9fb07fae4d,
type: 3}
m_PrefabInstance: {fileID: 5112378705130438364}
m_PrefabAsset: {fileID: 0}
--- !u!1 &5676996118944887893 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 592905859427273353, guid: 2c82036225f2d453cac3ff9fb07fae4d,
type: 3}
m_PrefabInstance: {fileID: 5112378705130438364}
m_PrefabAsset: {fileID: 0}
--- !u!1 &5676996119271212837 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 592905859906714105, guid: 2c82036225f2d453cac3ff9fb07fae4d,
--- !u!224 &5676996117682643678 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 592905858299255810, guid: 2c82036225f2d453cac3ff9fb07fae4d,
type: 3}
m_PrefabInstance: {fileID: 5112378705130438364}
m_PrefabAsset: {fileID: 0}

View File

@ -30,6 +30,7 @@ namespace MyGame.Scenes.Main.Scripts
var gameData = GameDataManager.GameData;
var autoCookDataList = SpreadsheetDataManager.Instance.GetBaseDataList<AutoCookData>(Const.AutoCookDataSheet);
var autoCookData = autoCookDataList.First(data => data.level == gameData.AutoCookLevel);
autoCookData.duration = JoypacUtils.OnlineParametersIntByJoypacSDK(StaticOnlineParams.AutoCookTime);
var maxLevel = autoCookDataList.Last().level;
var isMaxLevel = autoCookData.level >= maxLevel;

View File

@ -8,7 +8,7 @@ public class BulkOrderItemView : MonoBehaviour
{
private static readonly string amountFormat = "x{0}";
[SerializeField] private Button cookingButton;
[SerializeField] private GameObject disabledObject;
[SerializeField] private Button disabledObject;
[SerializeField] private GameObject cookedObject;
[SerializeField] private GameObject perfectCookedObject;
[SerializeField] private RarityView rarityView;
@ -55,8 +55,58 @@ public class BulkOrderItemView : MonoBehaviour
{
material2Text.transform.parent.gameObject.SetActive(false);
}
disabledObject.OnClickAsObservable().Take(1).Subscribe(_ =>
{
onClichJump(data);
}).AddTo(this);
}
void onClichJump(ProductData productData)
{
var checkResult = CheckAmounts(productData);
if (!checkResult.material1)
{
TransitionManager.Instance.LoadScene(GameScenes.CornField);
}
if (!checkResult.material2)
{
TransitionManager.Instance.JumpId = productData.MaterialList[1].id;
TransitionManager.Instance.LoadScene(GameScenes.shopping);
}
if (!checkResult.material3)
{
TransitionManager.Instance.JumpId = productData.MaterialList[2].id;
TransitionManager.Instance.LoadScene(GameScenes.shopping);
}
}
public static (bool material1, bool material2, bool material3) CheckAmounts(ProductData productData)
{
(bool a, bool b, bool c) flags = (true, true, true);
var gameData = GameDataManager.GameData;
if (gameData.CornSeed < productData.MaterialList[0].amount)
{
flags.a = false;
}
if ((gameData.Material.FirstOrDefault(data => data.Id == productData.MaterialList[1].id)?.Amount ?? 0) < productData.MaterialList[1].amount)
{
flags.b = false;
}
if (productData.GetMaterialCount() == 3 && (gameData.Material.FirstOrDefault(data => data.Id == productData.MaterialList[2].id)?.Amount ?? 0) < productData.MaterialList[2].amount)
{
flags.c = false;
}
return flags;
}
public bool CheckAmount(ProductData productData)
{
var flag = true;
@ -84,13 +134,13 @@ public class BulkOrderItemView : MonoBehaviour
cookedObject.SetActive(false);
perfectCookedObject.SetActive(false);
cookingButton.gameObject.SetActive(active);
disabledObject.SetActive(!active);
disabledObject.gameObject.SetActive(!active);
}
public void SetCooked(ProductRarity rarity)
{
cookingButton.gameObject.SetActive(false);
disabledObject.SetActive(false);
disabledObject.gameObject.SetActive(false);
cookedObject.SetActive(rarity == ProductRarity.Normal);
perfectCookedObject.SetActive(!cookedObject.activeSelf);
rarityView.SetRarity(rarity);

View File

@ -79,7 +79,7 @@ public class KitchenManager : MonoBehaviour
// 自動調理
autoCookView.Initialize();
// レベル確認
autoCookView.SetActive(gameData.ViewedShopLevel >= Const.AutoCookAvailableLevel);
autoCookView.SetActive(gameData.ViewedShopLevel >= JoypacUtils.OnlineParametersIntByJoypacSDK(StaticOnlineParams.AutoCookLevel));
var autoCookDataList = SpreadsheetDataManager.Instance.GetBaseDataList<AutoCookData>(Const.AutoCookDataSheet);
if (autoCookDataList.FirstOrDefault(data => data.level == gameData.AutoCookLevel) is AutoCookData autoCookData)
@ -208,7 +208,7 @@ public class KitchenManager : MonoBehaviour
{
kitchenView.SetActive(true);
CheckOrderAndSetPhoneTap();
autoCookView.SetActive(gameData.ViewedShopLevel >= Const.AutoCookAvailableLevel);
autoCookView.SetActive(gameData.ViewedShopLevel >= JoypacUtils.OnlineParametersIntByJoypacSDK(StaticOnlineParams.AutoCookLevel));
});
}).AddTo(this);

View File

@ -24,7 +24,7 @@ public static class Const {
public static readonly int[] ManagementTutorial = { 9 };
public static readonly float VipCustomerRewardStock = 20; // Market.ShopStockCount以下にする
public static readonly float VipCustomerRewardRate = 0.1f;
public static readonly int AutoCookAvailableLevel = 7;
public static readonly int AutoCookAvailableLevel = JoypacUtils.OnlineParametersIntByJoypacSDK(StaticOnlineParams.AutoCookLevel);
// tag
public static readonly string GameDataTag = "GameData";

View File

@ -34,7 +34,6 @@ GraphicsSettings:
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}

View File

@ -127,7 +127,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 1.0.0
bundleVersion: 1.1.5
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
@ -751,7 +751,7 @@ PlayerSettings:
webGLWasmStreaming: 0
scriptingDefineSymbols:
1: TextMeshPro
4: TextMeshPro
4: TextMeshPro;Notifications;IssuePerson
7: ANDROID_CN;TextMeshPro
13: TextMeshPro
14: TextMeshPro