game: dialogue interactions
This commit is contained in:
parent
1ec74b7701
commit
93a5904f1a
6 changed files with 203 additions and 40 deletions
|
@ -2115,9 +2115,7 @@ RectTransform:
|
|||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1341287578}
|
||||
- {fileID: 943865088}
|
||||
- {fileID: 1981807126}
|
||||
- {fileID: 1507994915}
|
||||
- {fileID: 1098954591}
|
||||
- {fileID: 2007606248}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 39.148, z: 0}
|
||||
|
@ -5029,6 +5027,8 @@ MonoBehaviour:
|
|||
dayEnded: 0
|
||||
shiftStarted: 0
|
||||
currentNPC: {fileID: 0}
|
||||
currentNPCCorrectDepartment:
|
||||
buttonsPressedBefore: 0
|
||||
playerQuestionOneText: {fileID: 1887540466}
|
||||
playerQuestionTwoText: {fileID: 1284755197}
|
||||
playerQuestionThreeText: {fileID: 1918802128}
|
||||
|
@ -8347,7 +8347,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &943865088
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -8355,13 +8355,13 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 943865087}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1887540465}
|
||||
m_Father: {fileID: 272065567}
|
||||
m_Father: {fileID: 1098954591}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
@ -9846,6 +9846,84 @@ MonoBehaviour:
|
|||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &1098954590
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1098954591}
|
||||
- component: {fileID: 1098954593}
|
||||
- component: {fileID: 1098954592}
|
||||
m_Layer: 5
|
||||
m_Name: Questions
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1098954591
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1098954590}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 943865088}
|
||||
- {fileID: 1981807126}
|
||||
- {fileID: 1507994915}
|
||||
m_Father: {fileID: 272065567}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1098954592
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1098954590}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 0}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &1098954593
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1098954590}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1110104612
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -12295,7 +12373,7 @@ RectTransform:
|
|||
m_GameObject: {fileID: 1284755195}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_LocalScale: {x: 0.84974, y: 0.84974, z: 0.84974}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1981807126}
|
||||
|
@ -12352,11 +12430,11 @@ MonoBehaviour:
|
|||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 60.45
|
||||
m_fontSizeBase: 60.45
|
||||
m_fontSize: 72
|
||||
m_fontSizeBase: 44.52
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_enableAutoSizing: 1
|
||||
m_fontSizeMin: 20
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
|
@ -13157,7 +13235,43 @@ MonoBehaviour:
|
|||
m_TargetGraphic: {fileID: 1341287580}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1341287577}
|
||||
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
|
||||
m_MethodName: SetActive
|
||||
m_Mode: 6
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
- m_Target: {fileID: 1098954590}
|
||||
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
|
||||
m_MethodName: SetActive
|
||||
m_Mode: 6
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 1
|
||||
m_CallState: 2
|
||||
- m_Target: {fileID: 1930049738}
|
||||
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
|
||||
m_MethodName: SetActive
|
||||
m_Mode: 6
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 1
|
||||
m_CallState: 2
|
||||
--- !u!114 &1341287580
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -14271,7 +14385,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1507994915
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -14279,13 +14393,13 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1507994914}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1918802127}
|
||||
m_Father: {fileID: 272065567}
|
||||
m_Father: {fileID: 1098954591}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
@ -17314,7 +17428,7 @@ RectTransform:
|
|||
m_GameObject: {fileID: 1887540464}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_LocalScale: {x: 0.84974, y: 0.84974, z: 0.84974}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 943865088}
|
||||
|
@ -17371,11 +17485,11 @@ MonoBehaviour:
|
|||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 60.45
|
||||
m_fontSizeBase: 60.45
|
||||
m_fontSize: 72
|
||||
m_fontSizeBase: 44.52
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_enableAutoSizing: 1
|
||||
m_fontSizeMin: 20
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
|
@ -17806,7 +17920,7 @@ RectTransform:
|
|||
m_GameObject: {fileID: 1918802126}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_LocalScale: {x: 0.84974, y: 0.84974, z: 0.84974}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1507994915}
|
||||
|
@ -17863,11 +17977,11 @@ MonoBehaviour:
|
|||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 60.45
|
||||
m_fontSizeBase: 60.45
|
||||
m_fontSize: 72
|
||||
m_fontSizeBase: 44.52
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_enableAutoSizing: 1
|
||||
m_fontSizeMin: 20
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
|
@ -17996,6 +18110,11 @@ MeshFilter:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1921590481}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &1930049738 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 2125865357384512086, guid: 7795d1095e0684f468f5b8231bb7705f, type: 3}
|
||||
m_PrefabInstance: {fileID: 101598008}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1938714094
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -18550,7 +18669,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1981807126
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -18558,17 +18677,17 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1981807125}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1284755196}
|
||||
m_Father: {fileID: 272065567}
|
||||
m_Father: {fileID: 1098954591}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0.0000019073486}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 610, y: 125.97}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1981807127
|
||||
|
|
|
@ -27,13 +27,14 @@ public class GameManager : MonoBehaviour
|
|||
/// NPC in front of desk
|
||||
/// </summary>
|
||||
public GameObject currentNPC;
|
||||
|
||||
public string currentNPCCorrectDepartment;
|
||||
|
||||
public bool buttonsPressedBefore;
|
||||
|
||||
///<summary>
|
||||
/// References for player-npc dialogue
|
||||
/// </summary>
|
||||
[Header("NPC Dialogue")]
|
||||
[Header("NPC Dialogue")]
|
||||
public TextMeshProUGUI playerQuestionOneText;
|
||||
public TextMeshProUGUI playerQuestionTwoText;
|
||||
public TextMeshProUGUI playerQuestionThreeText;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* Author: Livinia Poo
|
||||
* Date: 1/2/25
|
||||
* Description:
|
||||
* Paper Handling
|
||||
Interaction*/
|
||||
* Paper Handling Interaction
|
||||
*/
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -35,8 +35,6 @@ public class PaperSpawn : MonoBehaviour
|
|||
{
|
||||
handInPaperSpawn = true;
|
||||
playerHand = other.GetComponent<XRDirectInteractor>();
|
||||
|
||||
Debug.Log("Player hand in paper area!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -46,8 +44,6 @@ public class PaperSpawn : MonoBehaviour
|
|||
{
|
||||
handInPaperSpawn = false;
|
||||
playerHand = null;
|
||||
|
||||
Debug.Log("Player hand left paper area!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,7 +56,6 @@ public class PaperSpawn : MonoBehaviour
|
|||
|
||||
if (isGrabbing)
|
||||
{
|
||||
Debug.Log("Player hand grabbing in paper area!");
|
||||
SpawnPaper();
|
||||
}
|
||||
}
|
||||
|
@ -71,8 +66,6 @@ public class PaperSpawn : MonoBehaviour
|
|||
GameObject spawnedPaper = Instantiate(paperPrefab, playerHand.transform.position, Quaternion.identity);
|
||||
XRGrabInteractable grabComponent = spawnedPaper.GetComponent<XRGrabInteractable>();
|
||||
|
||||
Debug.Log("Paper Spawned!");
|
||||
|
||||
if (grabComponent != null)
|
||||
{
|
||||
playerHand.interactionManager.SelectEnter((IXRSelectInteractor)playerHand, (IXRSelectInteractable)grabComponent);
|
||||
|
|
39
SSLR/Assets/Scripts/PlayerDialogueInteraction.cs
Normal file
39
SSLR/Assets/Scripts/PlayerDialogueInteraction.cs
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Author: Livinia Poo
|
||||
* Date: 1/2/25
|
||||
* Description:
|
||||
* Dialogue Interaction (Player side)
|
||||
*/
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerDialogueInteraction : MonoBehaviour
|
||||
{
|
||||
[Header("Checklist Ticks")]
|
||||
public GameObject welcomeTick;
|
||||
public GameObject situationTick;
|
||||
public GameObject takeDocumentsTick;
|
||||
public GameObject servicesTick;
|
||||
public GameObject giveDocumentsTick;
|
||||
|
||||
/// <summary>
|
||||
/// Resets checklist when npc is finished
|
||||
/// </summary>
|
||||
public void ResetChecklist()
|
||||
{
|
||||
welcomeTick.SetActive(false);
|
||||
situationTick.SetActive(false);
|
||||
takeDocumentsTick.SetActive(false);
|
||||
servicesTick.SetActive(false);
|
||||
giveDocumentsTick.SetActive(false);
|
||||
}
|
||||
|
||||
public void ResetDialogue()
|
||||
{
|
||||
GameManager.instance.playerDialogue.SetActive(false);
|
||||
}
|
||||
|
||||
|
||||
}
|
11
SSLR/Assets/Scripts/PlayerDialogueInteraction.cs.meta
Normal file
11
SSLR/Assets/Scripts/PlayerDialogueInteraction.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 43ab94a182a72874bb0ca70a941888af
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Reference in a new issue