game: game flow works
This commit is contained in:
parent
f9b7471aee
commit
0e44d1db15
16 changed files with 124 additions and 35 deletions
|
@ -674,7 +674,7 @@ Transform:
|
|||
m_GameObject: {fileID: 3556498266740698296}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.00000016391276}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.818, z: 0.474}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.918, z: 0.474}
|
||||
m_LocalScale: {x: 0.45396, y: 0.01469, z: 0.57689}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
|
|
@ -268,7 +268,7 @@ Transform:
|
|||
m_GameObject: {fileID: 1785374020187378694}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.00000016391276}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.818, z: 0.474}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.918, z: 0.474}
|
||||
m_LocalScale: {x: 0.45396, y: 0.01469, z: 0.57689}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
|
|
@ -1117,7 +1117,7 @@ Transform:
|
|||
m_GameObject: {fileID: 7694716630882756943}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.00000016391276}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.818, z: 0.474}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.918, z: 0.474}
|
||||
m_LocalScale: {x: 0.45396, y: 0.01469, z: 0.57689}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
|
|
@ -402,7 +402,7 @@ Transform:
|
|||
m_GameObject: {fileID: 6305475373166175447}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.00000016391276}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.818, z: 0.474}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.918, z: 0.474}
|
||||
m_LocalScale: {x: 0.45396, y: 0.01469, z: 0.57689}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
|
|
@ -983,7 +983,7 @@ Transform:
|
|||
m_GameObject: {fileID: 4476012752627612937}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.00000016391276}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.818, z: 0.474}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.918, z: 0.474}
|
||||
m_LocalScale: {x: 0.45396, y: 0.01469, z: 0.57689}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
|
|
@ -1117,7 +1117,7 @@ Transform:
|
|||
m_GameObject: {fileID: 9182391001311392250}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.00000016391276}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.818, z: 0.474}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.918, z: 0.474}
|
||||
m_LocalScale: {x: 0.45396, y: 0.01469, z: 0.57689}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
|
|
@ -29,7 +29,7 @@ Transform:
|
|||
m_GameObject: {fileID: 1101133743960231593}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.00000016391276}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.818, z: 0.474}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.918, z: 0.474}
|
||||
m_LocalScale: {x: 0.45396, y: 0.01469, z: 0.57689}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
|
|
@ -313,7 +313,7 @@ Transform:
|
|||
m_GameObject: {fileID: 834682010213193268}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.00000016391276}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.818, z: 0.474}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.918, z: 0.474}
|
||||
m_LocalScale: {x: 0.45396, y: 0.01469, z: 0.57689}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
|
|
@ -533,7 +533,7 @@ Transform:
|
|||
m_GameObject: {fileID: 4081393121370720058}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.00000016391276}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.818, z: 0.474}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.918, z: 0.474}
|
||||
m_LocalScale: {x: 0.45396, y: 0.01469, z: 0.57689}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
|
|
@ -29,7 +29,7 @@ Transform:
|
|||
m_GameObject: {fileID: 102797962149389305}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.00000016391276}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.818, z: 0.474}
|
||||
m_LocalPosition: {x: -0.4565086, y: 0.918, z: 0.474}
|
||||
m_LocalScale: {x: 0.45396, y: 0.01469, z: 0.57689}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
|
|
@ -5697,7 +5697,9 @@ MonoBehaviour:
|
|||
- SeatObject: {fileID: 14863571}
|
||||
Available: 1
|
||||
currentNpcs: []
|
||||
despawnPoints: []
|
||||
despawnPoints:
|
||||
- {fileID: 849138917}
|
||||
- {fileID: 1742359896}
|
||||
desk: {fileID: 1068269875}
|
||||
--- !u!114 &520849220
|
||||
MonoBehaviour:
|
||||
|
@ -6804,7 +6806,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 0bab791ccf13189449b82b8f0b70b269, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
shiftDuration: 60
|
||||
shiftDuration: 120
|
||||
npcSpawnArea: {fileID: 1126609776}
|
||||
--- !u!1 &741702766
|
||||
GameObject:
|
||||
|
@ -7839,6 +7841,37 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 836290519}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &849138916
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 849138917}
|
||||
m_Layer: 0
|
||||
m_Name: Left Despawn
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &849138917
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 849138916}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -2.554, y: 0.736, z: -0.557}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &883953354
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -17738,6 +17771,37 @@ MonoBehaviour:
|
|||
m_IgnoreFromBuild: 0
|
||||
m_ApplyToChildren: 1
|
||||
m_AffectedAgents: ffffffff
|
||||
--- !u!1 &1742359895
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1742359896}
|
||||
m_Layer: 0
|
||||
m_Name: Right Despawn
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1742359896
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1742359895}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 2.192, y: 0.736, z: -0.557}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1752294637
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -21093,7 +21157,7 @@ MonoBehaviour:
|
|||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument: Comcare
|
||||
m_StringArgument: ComCare
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &2143047717
|
||||
|
@ -21347,3 +21411,5 @@ SceneRoots:
|
|||
- {fileID: 1399971910}
|
||||
- {fileID: 43707400}
|
||||
- {fileID: 1468703799}
|
||||
- {fileID: 849138917}
|
||||
- {fileID: 1742359896}
|
||||
|
|
|
@ -228,6 +228,13 @@ public class NpcMovementRework : MonoBehaviour
|
|||
npcClarifiedResponse.text = "I see...";
|
||||
|
||||
PlayerDialogueInteraction.instance.SetPlayerQuestions(npcData.question1, npcData.question2, npcData.question3);
|
||||
PlayerDialogueInteraction.instance.SetPlayerResposne(npcData.response3);
|
||||
PlayerDialogueInteraction.instance.SetPlayerResponse(npcData.response3);
|
||||
}
|
||||
|
||||
public void EndDialogue()
|
||||
{
|
||||
npcSpeechBubble.SetActive(false);
|
||||
npcAnswerPanel.SetActive(false);
|
||||
PlayerDialogueInteraction.instance.playerDialogue.SetActive(false);
|
||||
}
|
||||
}
|
|
@ -13,11 +13,16 @@ public class NextButton : MonoBehaviour
|
|||
/// Next NPC to desk based on scene list
|
||||
/// </summary>
|
||||
public void CallNext()
|
||||
{
|
||||
if(GameManager.instance.currentNPC == null)
|
||||
{
|
||||
var npcs = NpcManager.instance.currentNpcs;
|
||||
var randomnpc = npcs[Random.Range(0, npcs.Count)];
|
||||
|
||||
GameManager.instance.SetCurrentNPC(randomnpc);
|
||||
randomnpc.GetComponent<NpcMovementRework>().Called();
|
||||
|
||||
PlayerDialogueInteraction.instance.ResetChecklist();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,6 +71,11 @@ public class PaperSocket : MonoBehaviour
|
|||
Debug.Log(paperDepartment);
|
||||
|
||||
Destroy(paperObject);
|
||||
|
||||
GameManager.instance.currentNPC.GetComponent<NpcMovementRework>().EndDialogue();
|
||||
|
||||
GameManager.instance.currentNPC.GetComponent<NpcMovementRework>().Despawn();
|
||||
GameManager.instance.currentNPC = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -43,13 +43,9 @@ public class PlayerDialogueInteraction : MonoBehaviour
|
|||
public GameObject takeDocumentsTick;
|
||||
public GameObject giveDocumentsTick;
|
||||
|
||||
[Header("Services")]
|
||||
/*public GameObject comcareServiceButton;
|
||||
public GameObject fscServiceButton;
|
||||
public GameObject peersServiceButton;
|
||||
public GameObject transitionalSheltersServiceButton;
|
||||
public GameObject cpsServiceButton;
|
||||
public GameObject sgEnableServiceButton;*/
|
||||
/// <summary>
|
||||
/// Reference to current document
|
||||
/// </summary>
|
||||
public GameObject currentDocument;
|
||||
|
||||
/// <summary>
|
||||
|
@ -115,7 +111,7 @@ public class PlayerDialogueInteraction : MonoBehaviour
|
|||
/// Assigning UI text from npcData
|
||||
/// </summary>
|
||||
/// <param name="response"></param>
|
||||
public void SetPlayerResposne(string response)
|
||||
public void SetPlayerResponse(string response)
|
||||
{
|
||||
playerResponseText.text = response;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,16 @@ public class StampDocument : MonoBehaviour
|
|||
/// <returns></returns>
|
||||
public string CheckFinalDepartment()
|
||||
{
|
||||
return $"{assignedDepartment}-{assignedService}";
|
||||
var paperDepartment = $"{assignedDepartment} - {assignedService}";
|
||||
|
||||
if (paperDepartment == GameManager.instance.currentNPCCorrectDepartment)
|
||||
{
|
||||
return "Correct";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Wrong";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -68,6 +77,7 @@ public class StampDocument : MonoBehaviour
|
|||
isStamped = false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Financial stamp appear, assign department and declare stamped
|
||||
/// </summary>
|
||||
|
@ -118,42 +128,42 @@ public class StampDocument : MonoBehaviour
|
|||
case "ComCare":
|
||||
comcareSignature.SetActive(true);
|
||||
isSigned = true;
|
||||
assignedDepartment = "ComCare";
|
||||
assignedService = "ComCare";
|
||||
PlayerDialogueInteraction.instance.servicesPanel.SetActive(false);
|
||||
PlayerDialogueInteraction.instance.questionPanel.SetActive(true);
|
||||
break;
|
||||
case "FSC":
|
||||
fscSignature.SetActive(true);
|
||||
isSigned = true;
|
||||
assignedDepartment = "Family Service Centres";
|
||||
assignedService = "Family Service Centres";
|
||||
PlayerDialogueInteraction.instance.servicesPanel.SetActive(false);
|
||||
PlayerDialogueInteraction.instance.questionPanel.SetActive(true);
|
||||
break;
|
||||
case "PEERS":
|
||||
peersSignature.SetActive(true);
|
||||
isSigned = true;
|
||||
assignedDepartment = "PEERS";
|
||||
assignedService = "PEERS";
|
||||
PlayerDialogueInteraction.instance.servicesPanel.SetActive(false);
|
||||
PlayerDialogueInteraction.instance.questionPanel.SetActive(true);
|
||||
break;
|
||||
case "Transitional Shelters":
|
||||
transitionalShelterSignature.SetActive(true);
|
||||
isSigned = true;
|
||||
assignedDepartment = "Transitional Shelters";
|
||||
assignedService = "Transitional Shelters";
|
||||
PlayerDialogueInteraction.instance.servicesPanel.SetActive(false);
|
||||
PlayerDialogueInteraction.instance.questionPanel.SetActive(true);
|
||||
break;
|
||||
case "CPS":
|
||||
cpsSignature.SetActive(true);
|
||||
isSigned = true;
|
||||
assignedDepartment = "CPS";
|
||||
assignedService = "CPS";
|
||||
PlayerDialogueInteraction.instance.servicesPanel.SetActive(false);
|
||||
PlayerDialogueInteraction.instance.questionPanel.SetActive(true);
|
||||
break;
|
||||
case "SG Enable":
|
||||
sgEnableSignature.SetActive(true);
|
||||
isSigned = true;
|
||||
assignedDepartment = "SG Enable";
|
||||
assignedService = "SG Enable";
|
||||
PlayerDialogueInteraction.instance.servicesPanel.SetActive(false);
|
||||
PlayerDialogueInteraction.instance.questionPanel.SetActive(true);
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue