Fix quest retry

This commit is contained in:
2023-07-09 12:05:51 +02:00
parent f9f611ab92
commit a00e4a6e98
2 changed files with 9 additions and 7 deletions

View File

@@ -2898,7 +2898,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3388867341823709995, guid: 5d865034cc8c4794082f625589d47ad6, type: 3} - target: {fileID: 3388867341823709995, guid: 5d865034cc8c4794082f625589d47ad6, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0.20577693 value: 3.32
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3388867341823709995, guid: 5d865034cc8c4794082f625589d47ad6, type: 3} - target: {fileID: 3388867341823709995, guid: 5d865034cc8c4794082f625589d47ad6, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
@@ -2906,7 +2906,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3388867341823709995, guid: 5d865034cc8c4794082f625589d47ad6, type: 3} - target: {fileID: 3388867341823709995, guid: 5d865034cc8c4794082f625589d47ad6, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: -0.5997834 value: -1.2
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3388867341823709995, guid: 5d865034cc8c4794082f625589d47ad6, type: 3} - target: {fileID: 3388867341823709995, guid: 5d865034cc8c4794082f625589d47ad6, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
@@ -5363,7 +5363,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_text: NextQuest m_text: Retry
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -5837,7 +5837,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_text: NextQuest m_text: Next Quest
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -6913,7 +6913,7 @@ MonoBehaviour:
m_Calls: m_Calls:
- m_Target: {fileID: 243041993} - m_Target: {fileID: 243041993}
m_TargetAssemblyTypeName: Journal, Assembly-CSharp m_TargetAssemblyTypeName: Journal, Assembly-CSharp
m_MethodName: StartNextQuest m_MethodName: RetryQuest
m_Mode: 1 m_Mode: 1
m_Arguments: m_Arguments:
m_ObjectArgument: {fileID: 0} m_ObjectArgument: {fileID: 0}

View File

@@ -95,7 +95,9 @@ public class Journal : MonoBehaviour
bool success = QuestManager.Instance.RunQuestWithAdventurer(m_availableAdventurers[m_selectedAdventurer], activeQuest); bool success = QuestManager.Instance.RunQuestWithAdventurer(m_availableAdventurers[m_selectedAdventurer], activeQuest);
Debug.Log("THE QUESTR ESULT WAS: " + success); Debug.Log("THE QUESTR ESULT WAS: " + success);
adventurerPage.gameObject.SetActive(false); adventurerPage.gameObject.SetActive(false);
if(success)
questPage.Find("QuestResult").gameObject.SetActive(true);
if (success)
{ {
questPage.Find("QuestResult/NextQuest").gameObject.SetActive(true); questPage.Find("QuestResult/NextQuest").gameObject.SetActive(true);
questPage.Find("QuestResult/RetryQuest").gameObject.SetActive(false); questPage.Find("QuestResult/RetryQuest").gameObject.SetActive(false);
@@ -106,7 +108,7 @@ public class Journal : MonoBehaviour
} }
questPage.Find("QuestResult/QuestResultText").gameObject.GetComponent<TMP_Text>().text = success ? activeQuest.successStr : activeQuest.failedStr; questPage.Find("QuestResult/QuestResultText").gameObject.GetComponent<TMP_Text>().text = success ? activeQuest.successStr : activeQuest.failedStr;
questPage.Find("QuestResult").gameObject.SetActive(true);
} }
public void StartNextQuest() public void StartNextQuest()