Merge branch 'develop' of bitbucket.org:usaya/popcorn into develop
This commit is contained in:
commit
ad05a2081a
|
|
@ -34,7 +34,19 @@ AnimatorController:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_Name: background
|
m_Name: background
|
||||||
serializedVersion: 5
|
serializedVersion: 5
|
||||||
m_AnimatorParameters: []
|
m_AnimatorParameters:
|
||||||
|
- m_Name: CloseTrigger
|
||||||
|
m_Type: 9
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 0}
|
||||||
|
- m_Name: OpenTrigger
|
||||||
|
m_Type: 9
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 0}
|
||||||
m_AnimatorLayers:
|
m_AnimatorLayers:
|
||||||
- serializedVersion: 5
|
- serializedVersion: 5
|
||||||
m_Name: Base Layer
|
m_Name: Base Layer
|
||||||
|
|
@ -59,16 +71,18 @@ AnimatorStateMachine:
|
||||||
m_ChildStates:
|
m_ChildStates:
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: 4195247245938458414}
|
m_State: {fileID: 4195247245938458414}
|
||||||
m_Position: {x: 200, y: 0, z: 0}
|
m_Position: {x: 250, y: 50, z: 0}
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: -547162755097718829}
|
m_State: {fileID: -547162755097718829}
|
||||||
m_Position: {x: 235, y: 65, z: 0}
|
m_Position: {x: 250, y: -30, z: 0}
|
||||||
m_ChildStateMachines: []
|
m_ChildStateMachines: []
|
||||||
m_AnyStateTransitions: []
|
m_AnyStateTransitions:
|
||||||
|
- {fileID: 4488732903850140810}
|
||||||
|
- {fileID: 8164900940917987307}
|
||||||
m_EntryTransitions: []
|
m_EntryTransitions: []
|
||||||
m_StateMachineTransitions: {}
|
m_StateMachineTransitions: {}
|
||||||
m_StateMachineBehaviours: []
|
m_StateMachineBehaviours: []
|
||||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
m_AnyStatePosition: {x: 70, y: -200, z: 0}
|
||||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
|
@ -99,3 +113,53 @@ AnimatorState:
|
||||||
m_MirrorParameter:
|
m_MirrorParameter:
|
||||||
m_CycleOffsetParameter:
|
m_CycleOffsetParameter:
|
||||||
m_TimeParameter:
|
m_TimeParameter:
|
||||||
|
--- !u!1101 &4488732903850140810
|
||||||
|
AnimatorStateTransition:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_Conditions:
|
||||||
|
- m_ConditionMode: 1
|
||||||
|
m_ConditionEvent: CloseTrigger
|
||||||
|
m_EventTreshold: 0
|
||||||
|
m_DstStateMachine: {fileID: 0}
|
||||||
|
m_DstState: {fileID: -547162755097718829}
|
||||||
|
m_Solo: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_IsExit: 0
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransitionDuration: 0
|
||||||
|
m_TransitionOffset: 0
|
||||||
|
m_ExitTime: 0.75
|
||||||
|
m_HasExitTime: 0
|
||||||
|
m_HasFixedDuration: 1
|
||||||
|
m_InterruptionSource: 0
|
||||||
|
m_OrderedInterruption: 1
|
||||||
|
m_CanTransitionToSelf: 1
|
||||||
|
--- !u!1101 &8164900940917987307
|
||||||
|
AnimatorStateTransition:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_Conditions:
|
||||||
|
- m_ConditionMode: 1
|
||||||
|
m_ConditionEvent: OpenTrigger
|
||||||
|
m_EventTreshold: 0
|
||||||
|
m_DstStateMachine: {fileID: 0}
|
||||||
|
m_DstState: {fileID: 4195247245938458414}
|
||||||
|
m_Solo: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_IsExit: 0
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransitionDuration: 0
|
||||||
|
m_TransitionOffset: 0
|
||||||
|
m_ExitTime: 0.75
|
||||||
|
m_HasExitTime: 0
|
||||||
|
m_HasFixedDuration: 1
|
||||||
|
m_InterruptionSource: 0
|
||||||
|
m_OrderedInterruption: 1
|
||||||
|
m_CanTransitionToSelf: 1
|
||||||
|
|
|
||||||
|
|
@ -588,12 +588,14 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 47bc31a2c7d14478bd4ebe3c32e41185, type: 3}
|
m_Script: {fileID: 11500000, guid: 47bc31a2c7d14478bd4ebe3c32e41185, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
lockPanel: {fileID: 3261803197014340250}
|
||||||
detailButton: {fileID: 8320108874302735811}
|
detailButton: {fileID: 8320108874302735811}
|
||||||
flavorName: {fileID: 2929932626752093611}
|
flavorName: {fileID: 2929932626752093611}
|
||||||
flavorPrice: {fileID: 2929932627123125673}
|
flavorPrice: {fileID: 2929932627123125673}
|
||||||
cornAmountText: {fileID: 6296255899301773980}
|
cornAmountText: {fileID: 6296255899301773980}
|
||||||
flavor1AmountText: {fileID: 2929932625557648441}
|
flavor1AmountText: {fileID: 2929932625557648441}
|
||||||
flavor2AmountText: {fileID: 367551539734858426}
|
flavor2AmountText: {fileID: 367551539734858426}
|
||||||
|
flavor2View: {fileID: 367551539495355422}
|
||||||
--- !u!1 &2997770120253274331
|
--- !u!1 &2997770120253274331
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -1313,6 +1315,12 @@ RectTransform:
|
||||||
type: 3}
|
type: 3}
|
||||||
m_PrefabInstance: {fileID: 2452498385069847742}
|
m_PrefabInstance: {fileID: 2452498385069847742}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1 &367551539495355422 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 2814970099097301152, guid: e2818e79d8fc1f34388aff1b8969d340,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 2452498385069847742}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1001 &8101979052737494168
|
--- !u!1001 &8101979052737494168
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -1473,6 +1481,12 @@ PrefabInstance:
|
||||||
m_RemovedComponents:
|
m_RemovedComponents:
|
||||||
- {fileID: 2814970099097301159, guid: e2818e79d8fc1f34388aff1b8969d340, type: 3}
|
- {fileID: 2814970099097301159, guid: e2818e79d8fc1f34388aff1b8969d340, type: 3}
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: e2818e79d8fc1f34388aff1b8969d340, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: e2818e79d8fc1f34388aff1b8969d340, type: 3}
|
||||||
|
--- !u!224 &6296255899524172857 stripped
|
||||||
|
RectTransform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 2814970099097301153, guid: e2818e79d8fc1f34388aff1b8969d340,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 8101979052737494168}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!114 &6296255899301773980 stripped
|
--- !u!114 &6296255899301773980 stripped
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_CorrespondingSourceObject: {fileID: 2814970099411582468, guid: e2818e79d8fc1f34388aff1b8969d340,
|
m_CorrespondingSourceObject: {fileID: 2814970099411582468, guid: e2818e79d8fc1f34388aff1b8969d340,
|
||||||
|
|
@ -1485,9 +1499,3 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
--- !u!224 &6296255899524172857 stripped
|
|
||||||
RectTransform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 2814970099097301153, guid: e2818e79d8fc1f34388aff1b8969d340,
|
|
||||||
type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 8101979052737494168}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
|
|
|
||||||
|
|
@ -1265,7 +1265,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &858120090
|
--- !u!224 &858120090
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -1560,6 +1560,7 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 79171d1fad4a444cafc287590de884b7, type: 3}
|
m_Script: {fileID: 11500000, guid: 79171d1fad4a444cafc287590de884b7, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
backgroundAnimator: {fileID: 858120093}
|
||||||
cancelButton: {fileID: 843133640}
|
cancelButton: {fileID: 843133640}
|
||||||
nextButton: {fileID: 1853630204}
|
nextButton: {fileID: 1853630204}
|
||||||
flavorName: {fileID: 707887860}
|
flavorName: {fileID: 707887860}
|
||||||
|
|
@ -1568,6 +1569,7 @@ MonoBehaviour:
|
||||||
cornAmountText: {fileID: 4654596182167880407}
|
cornAmountText: {fileID: 4654596182167880407}
|
||||||
flavor1AmountText: {fileID: 5352886969301700758}
|
flavor1AmountText: {fileID: 5352886969301700758}
|
||||||
flavor2AmountText: {fileID: 1408233927}
|
flavor2AmountText: {fileID: 1408233927}
|
||||||
|
flavor2View: {fileID: 1408233928}
|
||||||
--- !u!1 &1036314250
|
--- !u!1 &1036314250
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -1735,7 +1737,7 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_RaycastTarget: 0
|
m_RaycastTarget: 1
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
|
|
@ -1985,6 +1987,11 @@ PrefabInstance:
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: NecessaryMaterial2
|
value: NecessaryMaterial2
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5352886967997046946, guid: c84cc6844fe59ef4d8e52438b7bffa42,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5352886967997046957, guid: c84cc6844fe59ef4d8e52438b7bffa42,
|
- target: {fileID: 5352886967997046957, guid: c84cc6844fe59ef4d8e52438b7bffa42,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_Pivot.x
|
propertyPath: m_Pivot.x
|
||||||
|
|
@ -2110,6 +2117,12 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!1 &1408233928 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 5352886967997046946, guid: c84cc6844fe59ef4d8e52438b7bffa42,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 1408233925}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1 &1484296443
|
--- !u!1 &1484296443
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,68 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
public class RecipeData
|
public class RecipeData
|
||||||
{
|
{
|
||||||
public int RecipeId;
|
public int RecipeId;
|
||||||
public string Name;
|
public string Name;
|
||||||
public int Price;
|
public int Price;
|
||||||
|
// public string IconSprite;
|
||||||
|
public int Volume;
|
||||||
public int CornAmount;
|
public int CornAmount;
|
||||||
public int Flavor1Amount;
|
public List<(int id, int amount)> Flavors;
|
||||||
public int Flavor2Amount;
|
|
||||||
|
public static List<RecipeData> GetAllRecipe()
|
||||||
|
{
|
||||||
|
return new List<RecipeData>
|
||||||
|
{
|
||||||
|
new RecipeData
|
||||||
|
{
|
||||||
|
RecipeId = 1,
|
||||||
|
Name = "塩コケコーン",
|
||||||
|
Price = 5,
|
||||||
|
Volume = 10,
|
||||||
|
CornAmount = 150,
|
||||||
|
Flavors = new List<(int id, int amount)>
|
||||||
|
{
|
||||||
|
(1, 1)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new RecipeData
|
||||||
|
{
|
||||||
|
RecipeId = 2,
|
||||||
|
Name = "キャラメルコケコーン",
|
||||||
|
Price = 15,
|
||||||
|
Volume = 10,
|
||||||
|
CornAmount = 150,
|
||||||
|
Flavors = new List<(int id, int amount)>
|
||||||
|
{
|
||||||
|
(6, 1)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new RecipeData
|
||||||
|
{
|
||||||
|
RecipeId = 3,
|
||||||
|
Name = "ブラックペッパーコケコーン",
|
||||||
|
Price = 9,
|
||||||
|
Volume = 10,
|
||||||
|
CornAmount = 150,
|
||||||
|
Flavors = new List<(int id, int amount)>
|
||||||
|
{
|
||||||
|
(2, 1)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new RecipeData
|
||||||
|
{
|
||||||
|
RecipeId = 13,
|
||||||
|
Name = "塩キャラメルコケコーン",
|
||||||
|
Price = 19,
|
||||||
|
Volume = 10,
|
||||||
|
CornAmount = 150,
|
||||||
|
Flavors = new List<(int id, int amount)>
|
||||||
|
{
|
||||||
|
(1, 1),
|
||||||
|
(6, 1),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,11 @@ using UnityEngine.UI;
|
||||||
public class RecipeDetailView : MonoBehaviour
|
public class RecipeDetailView : MonoBehaviour
|
||||||
{
|
{
|
||||||
public static readonly string DetailRecipeTag = "RecipeData";
|
public static readonly string DetailRecipeTag = "RecipeData";
|
||||||
|
private static readonly int OpenTrigger = Animator.StringToHash("OpenTrigger");
|
||||||
|
private static readonly int CloseTrigger = Animator.StringToHash("CloseTrigger");
|
||||||
|
|
||||||
|
|
||||||
|
[SerializeField] private Animator backgroundAnimator;
|
||||||
[SerializeField] private Button cancelButton;
|
[SerializeField] private Button cancelButton;
|
||||||
[SerializeField] private Button nextButton;
|
[SerializeField] private Button nextButton;
|
||||||
[SerializeField] private Text flavorName;
|
[SerializeField] private Text flavorName;
|
||||||
|
|
@ -15,22 +19,37 @@ public class RecipeDetailView : MonoBehaviour
|
||||||
[SerializeField] private Text cornAmountText;
|
[SerializeField] private Text cornAmountText;
|
||||||
[SerializeField] private Text flavor1AmountText;
|
[SerializeField] private Text flavor1AmountText;
|
||||||
[SerializeField] private Text flavor2AmountText;
|
[SerializeField] private Text flavor2AmountText;
|
||||||
|
[SerializeField] private GameObject flavor2View;
|
||||||
private static readonly string flavorStockFormat = "所持数 :{0}";
|
private static readonly string flavorStockFormat = "所持数 :{0}";
|
||||||
private static readonly string cornAmountFormat = "{0}/{1}";
|
private static readonly string cornAmountFormat = "{0}/{1}";
|
||||||
private static readonly string flavorAmountFormat = "{0} / {1}";
|
private static readonly string flavorAmountFormat = "{0} / {1}";
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
var data = LocalCacheManager.Load<RecipeData>(DetailRecipeTag);
|
||||||
|
|
||||||
cancelButton.OnClickAsObservable().Subscribe(_ =>
|
cancelButton.OnClickAsObservable().Subscribe(_ =>
|
||||||
|
{
|
||||||
|
backgroundAnimator.SetTrigger(CloseTrigger);
|
||||||
|
this.CallWaitForSeconds(.25f, () =>
|
||||||
{
|
{
|
||||||
TransitionManager.Instance.UnloadScene(GameScenes.RecipeChoice);
|
TransitionManager.Instance.UnloadScene(GameScenes.RecipeChoice);
|
||||||
|
});
|
||||||
}).AddTo(this);
|
}).AddTo(this);
|
||||||
|
|
||||||
|
SetRecipe(data);
|
||||||
|
if (CheckAmount(data))
|
||||||
|
{
|
||||||
nextButton.OnClickAsObservable().Subscribe(_ =>
|
nextButton.OnClickAsObservable().Subscribe(_ =>
|
||||||
{
|
{
|
||||||
|
|
||||||
TransitionManager.Instance.LoadScene(GameScenes.Cooking);
|
TransitionManager.Instance.LoadScene(GameScenes.Cooking);
|
||||||
}).AddTo(this);
|
}).AddTo(this);
|
||||||
var data = LocalCacheManager.Load<RecipeData>(DetailRecipeTag);
|
}
|
||||||
SetRecipe(data);
|
else
|
||||||
|
{
|
||||||
|
nextButton.interactable = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetRecipe(RecipeData data)
|
public void SetRecipe(RecipeData data)
|
||||||
|
|
@ -40,7 +59,37 @@ public class RecipeDetailView : MonoBehaviour
|
||||||
flavorName.text = data.Name;
|
flavorName.text = data.Name;
|
||||||
flavorPrice.text = data.Price.ToString();
|
flavorPrice.text = data.Price.ToString();
|
||||||
cornAmountText.text = string.Format(cornAmountFormat, gameData.cornSeed, data.CornAmount);
|
cornAmountText.text = string.Format(cornAmountFormat, gameData.cornSeed, data.CornAmount);
|
||||||
flavor1AmountText.text = string.Format(flavorAmountFormat, 999, data.Flavor1Amount);
|
flavor1AmountText.text = string.Format(flavorAmountFormat, 999, data.Flavors[0].amount);
|
||||||
flavor2AmountText.text = string.Format(flavorAmountFormat, 999, data.Flavor2Amount);
|
if (data.Flavors.Count == 2)
|
||||||
|
{
|
||||||
|
flavor2View.SetActive(true);
|
||||||
|
flavor2AmountText.text = string.Format(flavorAmountFormat, 0, data.Flavors[1].amount);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
flavor2View.SetActive(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool CheckAmount(RecipeData data)
|
||||||
|
{
|
||||||
|
var flag = true;
|
||||||
|
var gameData = GameDataManager.GameData;
|
||||||
|
if (gameData.cornSeed < data.CornAmount)
|
||||||
|
{
|
||||||
|
flag = false;
|
||||||
|
cornAmountText.color = Color.red;
|
||||||
|
}
|
||||||
|
if (999 < data.Flavors[0].amount)
|
||||||
|
{
|
||||||
|
flag = false;
|
||||||
|
flavor1AmountText.color = Color.red;
|
||||||
|
}
|
||||||
|
if (data.Flavors.Count == 2 && 0 < data.Flavors[1].amount)
|
||||||
|
{
|
||||||
|
flag = false;
|
||||||
|
flavor2AmountText.color = Color.red;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using UniRx;
|
using UniRx;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
@ -18,46 +19,35 @@ public class RecipeSelectDialog : MonoBehaviour
|
||||||
}).AddTo(this);
|
}).AddTo(this);
|
||||||
|
|
||||||
// 所持レシピ取得
|
// 所持レシピ取得
|
||||||
var recipes = new[]
|
var myRecipes = new[]
|
||||||
{
|
{
|
||||||
new RecipeData
|
1,
|
||||||
{
|
2,
|
||||||
RecipeId = 0,
|
13,
|
||||||
Name = "塩コケコーン",
|
|
||||||
Price = 5,
|
|
||||||
CornAmount = 60,
|
|
||||||
Flavor1Amount = 1,
|
|
||||||
Flavor2Amount = 1
|
|
||||||
},
|
|
||||||
new RecipeData
|
|
||||||
{
|
|
||||||
RecipeId = 0,
|
|
||||||
Name = "キャラメルコケコーン",
|
|
||||||
Price = 15,
|
|
||||||
CornAmount = 60,
|
|
||||||
Flavor1Amount = 1,
|
|
||||||
Flavor2Amount = 1
|
|
||||||
},
|
|
||||||
new RecipeData
|
|
||||||
{
|
|
||||||
RecipeId = 0,
|
|
||||||
Name = "ブラックペッパーコケコーン",
|
|
||||||
Price = 9,
|
|
||||||
CornAmount = 60,
|
|
||||||
Flavor1Amount = 1,
|
|
||||||
Flavor2Amount = 1
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 全レシピ
|
||||||
|
var allRecipe = RecipeData.GetAllRecipe();
|
||||||
|
|
||||||
// レシピ一覧生成
|
// レシピ一覧生成
|
||||||
foreach (var recipeData in recipes)
|
content.transform.DestroyAllChildrens();
|
||||||
|
foreach (var recipeData in allRecipe)
|
||||||
{
|
{
|
||||||
var view = Instantiate(recipePrefab, content.transform);
|
var view = Instantiate(recipePrefab, content.transform);
|
||||||
view.SetRecipe(recipeData);
|
view.SetRecipe(recipeData);
|
||||||
|
if (myRecipes.Contains(recipeData.RecipeId))
|
||||||
|
{
|
||||||
|
view.SetLockPanel(false);
|
||||||
view.RecipeClickObservable.Subscribe(_ =>
|
view.RecipeClickObservable.Subscribe(_ =>
|
||||||
{
|
{
|
||||||
LocalCacheManager.Save(RecipeDetailView.DetailRecipeTag, recipeData);
|
LocalCacheManager.Save(RecipeDetailView.DetailRecipeTag, recipeData);
|
||||||
TransitionManager.Instance.LoadSceneAdditive(GameScenes.RecipeChoice);
|
TransitionManager.Instance.LoadSceneAdditive(GameScenes.RecipeChoice);
|
||||||
}).AddTo(this);
|
}).AddTo(this);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
view.SetLockPanel(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,14 @@ using UnityEngine.UI;
|
||||||
|
|
||||||
public class RecipeView : MonoBehaviour
|
public class RecipeView : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
[SerializeField] private GameObject lockPanel;
|
||||||
[SerializeField] private Button detailButton;
|
[SerializeField] private Button detailButton;
|
||||||
[SerializeField] private Text flavorName;
|
[SerializeField] private Text flavorName;
|
||||||
[SerializeField] private Text flavorPrice;
|
[SerializeField] private Text flavorPrice;
|
||||||
[SerializeField] private Text cornAmountText;
|
[SerializeField] private Text cornAmountText;
|
||||||
[SerializeField] private Text flavor1AmountText;
|
[SerializeField] private Text flavor1AmountText;
|
||||||
[SerializeField] private Text flavor2AmountText;
|
[SerializeField] private Text flavor2AmountText;
|
||||||
|
[SerializeField] private GameObject flavor2View;
|
||||||
private static readonly string amountFormat = "x{0}";
|
private static readonly string amountFormat = "x{0}";
|
||||||
public IObservable<Unit> RecipeClickObservable => detailButton.OnClickAsObservable().TakeUntilDestroy(this);
|
public IObservable<Unit> RecipeClickObservable => detailButton.OnClickAsObservable().TakeUntilDestroy(this);
|
||||||
|
|
||||||
|
|
@ -23,7 +25,20 @@ public class RecipeView : MonoBehaviour
|
||||||
flavorName.text = data.Name;
|
flavorName.text = data.Name;
|
||||||
flavorPrice.text = data.Price.ToString();
|
flavorPrice.text = data.Price.ToString();
|
||||||
cornAmountText.text = string.Format(amountFormat, data.CornAmount);
|
cornAmountText.text = string.Format(amountFormat, data.CornAmount);
|
||||||
flavor1AmountText.text = string.Format(amountFormat, data.Flavor1Amount);
|
flavor1AmountText.text = string.Format(amountFormat, data.Flavors[0].amount);
|
||||||
flavor2AmountText.text = string.Format(amountFormat, data.Flavor2Amount);
|
if (data.Flavors.Count == 2)
|
||||||
|
{
|
||||||
|
flavor2View.SetActive(true);
|
||||||
|
flavor2AmountText.text = string.Format(amountFormat, data.Flavors[1].amount);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
flavor2View.SetActive(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetLockPanel(bool hasRecipe)
|
||||||
|
{
|
||||||
|
lockPanel.SetActive(hasRecipe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -947,7 +947,7 @@ MonoBehaviour:
|
||||||
m_TargetGraphic: {fileID: 2120123254}
|
m_TargetGraphic: {fileID: 2120123254}
|
||||||
m_HandleRect: {fileID: 2120123253}
|
m_HandleRect: {fileID: 2120123253}
|
||||||
m_Direction: 2
|
m_Direction: 2
|
||||||
m_Value: 0
|
m_Value: 1
|
||||||
m_Size: 1
|
m_Size: 1
|
||||||
m_NumberOfSteps: 0
|
m_NumberOfSteps: 0
|
||||||
m_OnValueChanged:
|
m_OnValueChanged:
|
||||||
|
|
@ -1020,7 +1020,7 @@ PrefabInstance:
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchorMax.y
|
propertyPath: m_AnchorMax.y
|
||||||
value: 1
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -1030,17 +1030,17 @@ PrefabInstance:
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchorMin.y
|
propertyPath: m_AnchorMin.y
|
||||||
value: 1
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_SizeDelta.x
|
propertyPath: m_SizeDelta.x
|
||||||
value: 490
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_SizeDelta.y
|
propertyPath: m_SizeDelta.y
|
||||||
value: 300
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -1080,12 +1080,12 @@ PrefabInstance:
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchoredPosition.x
|
propertyPath: m_AnchoredPosition.x
|
||||||
value: 715
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: -369.5
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -1110,7 +1110,7 @@ PrefabInstance:
|
||||||
- target: {fileID: 2929932627350163027, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163027, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
value: 0
|
value: 1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2969128505512012149, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2969128505512012149, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -1132,6 +1132,11 @@ PrefabInstance:
|
||||||
propertyPath: m_AnchoredPosition.x
|
propertyPath: m_AnchoredPosition.x
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3261803197014340250, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8440980752897465212, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 8440980752897465212, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchorMax.y
|
propertyPath: m_AnchorMax.y
|
||||||
|
|
@ -1145,17 +1150,17 @@ PrefabInstance:
|
||||||
- target: {fileID: 8440980752897465212, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 8440980752897465212, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_SizeDelta.x
|
propertyPath: m_SizeDelta.x
|
||||||
value: 0
|
value: 126.50001
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8440980752897465212, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 8440980752897465212, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchoredPosition.x
|
propertyPath: m_AnchoredPosition.x
|
||||||
value: 0
|
value: 107.25
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 9097260142390357153, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 9097260142390357153, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_SizeDelta.x
|
propertyPath: m_SizeDelta.x
|
||||||
value: 0
|
value: 170.5
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 2beb2d436ad55734186e797d315796b3, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 2beb2d436ad55734186e797d315796b3, type: 3}
|
||||||
|
|
@ -1382,7 +1387,7 @@ PrefabInstance:
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchorMax.y
|
propertyPath: m_AnchorMax.y
|
||||||
value: 1
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -1392,17 +1397,17 @@ PrefabInstance:
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchorMin.y
|
propertyPath: m_AnchorMin.y
|
||||||
value: 1
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_SizeDelta.x
|
propertyPath: m_SizeDelta.x
|
||||||
value: 490
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_SizeDelta.y
|
propertyPath: m_SizeDelta.y
|
||||||
value: 300
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -1442,12 +1447,12 @@ PrefabInstance:
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchoredPosition.x
|
propertyPath: m_AnchoredPosition.x
|
||||||
value: 245
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: -369.5
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -1472,7 +1477,7 @@ PrefabInstance:
|
||||||
- target: {fileID: 2929932627350163027, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163027, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
value: 0
|
value: 1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2969128505512012149, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2969128505512012149, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -2531,7 +2536,7 @@ PrefabInstance:
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchorMax.y
|
propertyPath: m_AnchorMax.y
|
||||||
value: 1
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -2541,17 +2546,17 @@ PrefabInstance:
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchorMin.y
|
propertyPath: m_AnchorMin.y
|
||||||
value: 1
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_SizeDelta.x
|
propertyPath: m_SizeDelta.x
|
||||||
value: 490
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_SizeDelta.y
|
propertyPath: m_SizeDelta.y
|
||||||
value: 300
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -2591,12 +2596,12 @@ PrefabInstance:
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchoredPosition.x
|
propertyPath: m_AnchoredPosition.x
|
||||||
value: 715
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: -150
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -2621,7 +2626,7 @@ PrefabInstance:
|
||||||
- target: {fileID: 2929932627350163027, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163027, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
value: 0
|
value: 1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2969128505512012149, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2969128505512012149, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -3107,7 +3112,7 @@ PrefabInstance:
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchorMax.y
|
propertyPath: m_AnchorMax.y
|
||||||
value: 1
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -3117,17 +3122,17 @@ PrefabInstance:
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchorMin.y
|
propertyPath: m_AnchorMin.y
|
||||||
value: 1
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_SizeDelta.x
|
propertyPath: m_SizeDelta.x
|
||||||
value: 490
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_SizeDelta.y
|
propertyPath: m_SizeDelta.y
|
||||||
value: 300
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -3167,12 +3172,12 @@ PrefabInstance:
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchoredPosition.x
|
propertyPath: m_AnchoredPosition.x
|
||||||
value: 245
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: -589
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163026, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -3197,7 +3202,7 @@ PrefabInstance:
|
||||||
- target: {fileID: 2929932627350163027, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2929932627350163027, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
value: 0
|
value: 1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2969128505512012149, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 2969128505512012149, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -3219,6 +3224,11 @@ PrefabInstance:
|
||||||
propertyPath: m_AnchoredPosition.x
|
propertyPath: m_AnchoredPosition.x
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3261803197014340250, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8440980752897465212, guid: 2beb2d436ad55734186e797d315796b3,
|
- target: {fileID: 8440980752897465212, guid: 2beb2d436ad55734186e797d315796b3,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_AnchorMax.y
|
propertyPath: m_AnchorMax.y
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
|
@ -55,6 +56,7 @@ public class CoinManager : SingletonMonoBehaviour<CoinManager>
|
||||||
private void InstantiateEffeect(RectTransform prefab, int count, Vector3 from, Vector3 to, Action callback)
|
private void InstantiateEffeect(RectTransform prefab, int count, Vector3 from, Vector3 to, Action callback)
|
||||||
{
|
{
|
||||||
var effect = Instantiate(prefab, Vector3.zero, Quaternion.identity, rootTransform);
|
var effect = Instantiate(prefab, Vector3.zero, Quaternion.identity, rootTransform);
|
||||||
|
effect.GetComponentInChildren<TextMeshProUGUI>().text = count.ToString();
|
||||||
// アニメ50フレーム
|
// アニメ50フレーム
|
||||||
this.CallWaitForSeconds(1.0f, () => {
|
this.CallWaitForSeconds(1.0f, () => {
|
||||||
// コインが到着したらSEとバイブ再生。コインはずみアニメーションを再生
|
// コインが到着したらSEとバイブ再生。コインはずみアニメーションを再生
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue