game(many): upd playg, interim scripts, interfaces tag
This commit is contained in:
parent
0ac2b01c10
commit
fa3eebba97
|
@ -185,6 +185,26 @@ PrefabInstance:
|
||||||
propertyPath: m_TagString
|
propertyPath: m_TagString
|
||||||
value: Player
|
value: Player
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5542111180780342640, guid: c708a3b79cd542b42bbfedb17e213bc1,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_BackGroundColor.a
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5542111180780342640, guid: c708a3b79cd542b42bbfedb17e213bc1,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_BackGroundColor.b
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5542111180780342640, guid: c708a3b79cd542b42bbfedb17e213bc1,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_BackGroundColor.g
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5542111180780342640, guid: c708a3b79cd542b42bbfedb17e213bc1,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_BackGroundColor.r
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8047161636021232021, guid: c708a3b79cd542b42bbfedb17e213bc1,
|
- target: {fileID: 8047161636021232021, guid: c708a3b79cd542b42bbfedb17e213bc1,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
|
@ -7605,6 +7625,55 @@ MonoBehaviour:
|
||||||
linkedLeapTrigger1: {fileID: 1785766166}
|
linkedLeapTrigger1: {fileID: 1785766166}
|
||||||
linkedLeapTrigger2: {fileID: 0}
|
linkedLeapTrigger2: {fileID: 0}
|
||||||
linkedLeapTrigger3: {fileID: 0}
|
linkedLeapTrigger3: {fileID: 0}
|
||||||
|
--- !u!1 &618797798
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 618797800}
|
||||||
|
- component: {fileID: 618797799}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Interaction Prompt Overlay
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 0
|
||||||
|
--- !u!114 &618797799
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 618797798}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_PanelSettings: {fileID: 11400000, guid: 21896e34ffd76694aa03bd08a51762a9, type: 2}
|
||||||
|
m_ParentUI: {fileID: 0}
|
||||||
|
sourceAsset: {fileID: 9197481963319205126, guid: 5ecae982f651ff6438bbaa95ba0362e1,
|
||||||
|
type: 3}
|
||||||
|
m_SortingOrder: 0
|
||||||
|
--- !u!4 &618797800
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 618797798}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 16.463919, y: -4.84284, z: 19.970129}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1798850120}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!43 &691061213
|
--- !u!43 &691061213
|
||||||
Mesh:
|
Mesh:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -7770,6 +7839,56 @@ Mesh:
|
||||||
offset: 0
|
offset: 0
|
||||||
size: 0
|
size: 0
|
||||||
path:
|
path:
|
||||||
|
--- !u!1 &917153437
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 917153439}
|
||||||
|
- component: {fileID: 917153438}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Audio Manager
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &917153438
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 917153437}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 723a7675db014cb3aca02f49d069e931, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
musicSource: {fileID: 0}
|
||||||
|
musicSourceDefaultVolume: 0.6
|
||||||
|
sfxSource: {fileID: 0}
|
||||||
|
sfxSourceDefaultVolume: 0.6
|
||||||
|
menuButtonClick: {fileID: 0}
|
||||||
|
menuButtonHover: {fileID: 0}
|
||||||
|
--- !u!4 &917153439
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 917153437}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: -16.463919, y: 4.84284, z: -19.970129}
|
||||||
|
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 &1006498776
|
--- !u!1 &1006498776
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -11029,6 +11148,50 @@ BoxCollider:
|
||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_Size: {x: 1.5532818, y: 0.5110284, z: 1.2993164}
|
m_Size: {x: 1.5532818, y: 0.5110284, z: 1.2993164}
|
||||||
m_Center: {x: 0.77663994, y: 0.21773233, z: 0.6496582}
|
m_Center: {x: 0.77663994, y: 0.21773233, z: 0.6496582}
|
||||||
|
--- !u!1 &1766444913
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1766444915}
|
||||||
|
- component: {fileID: 1766444914}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Game Manager
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &1766444914
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1766444913}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 9f6e55d96ef14d65979aabb99a0d5f1a, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!4 &1766444915
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1766444913}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: -16.463919, y: 4.84284, z: -19.970129}
|
||||||
|
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 &1785766159
|
--- !u!1 &1785766159
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -11396,6 +11559,38 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
isPlayerInAir: 0
|
isPlayerInAir: 0
|
||||||
|
--- !u!1 &1798850119
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1798850120}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Interfaces
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1798850120
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1798850119}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: -16.463919, y: 4.84284, z: -19.970129}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 618797800}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &1805235905
|
--- !u!1 &1805235905
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -12099,6 +12294,9 @@ Mesh:
|
||||||
SceneRoots:
|
SceneRoots:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_Roots:
|
m_Roots:
|
||||||
|
- {fileID: 1766444915}
|
||||||
|
- {fileID: 917153439}
|
||||||
|
- {fileID: 1798850120}
|
||||||
- {fileID: 567431775}
|
- {fileID: 567431775}
|
||||||
- {fileID: 1656492132}
|
- {fileID: 1656492132}
|
||||||
- {fileID: 1120089}
|
- {fileID: 1120089}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* authors: ryan lin, mark joshwel
|
* authors: mark joshwel, ryan lin
|
||||||
* date: 10/8/2024
|
* date: 10/8/2024
|
||||||
* description: common interactable behaviour class
|
* description: common interactable behaviour class
|
||||||
*/
|
*/
|
||||||
|
@ -7,12 +7,17 @@
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// TODO
|
/// base behaviour class for interactable objects
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CommonInteractable : MonoBehaviour
|
public class CommonInteractable : MonoBehaviour
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// TODO
|
/// the prompt to display when the player is looking at the object
|
||||||
|
/// </summary>
|
||||||
|
public string interactionPrompt = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// skeleton function for interacting with the object
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void Interact()
|
public virtual void Interact()
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,11 +21,6 @@ public class CommonMenu : MonoBehaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public GameManager.DisplayState associatedState = GameManager.DisplayState.UnassociatedState;
|
public GameManager.DisplayState associatedState = GameManager.DisplayState.UnassociatedState;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// manager for audio
|
|
||||||
/// </summary>
|
|
||||||
protected AudioManager Audio;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// manager for the game state
|
/// manager for the game state
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -47,9 +42,6 @@ private void Start()
|
||||||
|
|
||||||
if (Game == null)
|
if (Game == null)
|
||||||
throw new Exception("CommonMenu: Game not set (was base.OnEnable() or PostEnable() called?)");
|
throw new Exception("CommonMenu: Game not set (was base.OnEnable() or PostEnable() called?)");
|
||||||
|
|
||||||
if (Audio == null)
|
|
||||||
throw new Exception("CommonMenu: Audio not set (was base.OnEnable() or PostEnable() called?)");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -68,10 +60,10 @@ public void PostEnable()
|
||||||
{
|
{
|
||||||
// get audio manager singleton instance from the world
|
// get audio manager singleton instance from the world
|
||||||
UI = GetComponent<UIDocument>().rootVisualElement;
|
UI = GetComponent<UIDocument>().rootVisualElement;
|
||||||
Audio = AudioManager.Instance;
|
// Audio = AudioManager.Instance;
|
||||||
Game = GameManager.Instance;
|
Game = GameManager.Instance;
|
||||||
|
|
||||||
// subscribe to hover events
|
// // subscribe to hover events
|
||||||
UI.RegisterCallback<PointerOverEvent>(HoverListener);
|
UI.RegisterCallback<PointerOverEvent>(HoverListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,8 +96,8 @@ public virtual void ClickListener(ClickEvent evt)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void PlayClick()
|
public virtual void PlayClick()
|
||||||
{
|
{
|
||||||
// play click sound
|
// TODO: play click sound
|
||||||
Audio.PlayOnSFXChannel(Audio.menuButtonClick);
|
// Game.PlayOnSFXChannel(Audio.menuButtonClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -113,7 +105,7 @@ public virtual void PlayClick()
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void PlayHover()
|
public virtual void PlayHover()
|
||||||
{
|
{
|
||||||
// play hover sound
|
// TODO: play hover sound
|
||||||
Audio.PlayOnSFXChannel(Audio.menuButtonHover);
|
// Game.PlayOnSFXChannel(Audio.menuButtonHover);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -5,7 +5,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.SceneManagement;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// singleton class for managing the game state as a single source of truth
|
/// singleton class for managing the game state as a single source of truth
|
||||||
|
@ -18,11 +17,11 @@ public class GameManager : MonoBehaviour
|
||||||
public enum DisplayState
|
public enum DisplayState
|
||||||
{
|
{
|
||||||
Game,
|
Game,
|
||||||
ScreenMainMenu,
|
ScreenMainMenu, // done
|
||||||
ScreenOptionsMenu,
|
ScreenOptionsMenu, // done
|
||||||
OverlayPauseMenu,
|
OverlayPauseMenu, // TODO
|
||||||
OverlayCompleteUnderTimeMenu,
|
OverlayCompleteUnderTimeMenu, // TODO
|
||||||
OverlayFailedOverTimeMenu,
|
OverlayFailedOverTimeMenu, // TODO
|
||||||
UnassociatedState
|
UnassociatedState
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,19 +38,8 @@ public enum DisplayState
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// property to check if the game is paused based on the current <c>DisplayState</c>
|
/// property to check if the game is paused based on the current <c>DisplayState</c>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
// TODO: remove this if not needed
|
|
||||||
public bool Paused => _state != DisplayState.Game;
|
public bool Paused => _state != DisplayState.Game;
|
||||||
|
|
||||||
// /// <summary>
|
|
||||||
// /// the current scene of the game, used for scene switching and state transitions
|
|
||||||
// /// </summary>
|
|
||||||
// private Scene _currentScene;
|
|
||||||
//
|
|
||||||
// /// <summary>
|
|
||||||
// /// the previous scene of the game, used for scene switching and state transitions
|
|
||||||
// /// </summary>
|
|
||||||
// private Scene _previousScene;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// function to set doesn't destroy on load and checks for multiple instances
|
/// function to set doesn't destroy on load and checks for multiple instances
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -84,13 +72,6 @@ private void Awake()
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
SetDisplayState(DisplayState.ScreenMainMenu);
|
SetDisplayState(DisplayState.ScreenMainMenu);
|
||||||
|
|
||||||
// _currentScene = SceneManager.GetSceneByName("S2 World");
|
|
||||||
// _previousScene = _currentScene;
|
|
||||||
// if (_currentScene == null)
|
|
||||||
// {
|
|
||||||
// throw new Exception("GameManager.Start: current scene is null");
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -99,7 +80,7 @@ private void Start()
|
||||||
private void HideMenuHelper()
|
private void HideMenuHelper()
|
||||||
{
|
{
|
||||||
// get all child menus in the "Menus" parent object
|
// get all child menus in the "Menus" parent object
|
||||||
foreach (var menu in GameObject.FindGameObjectsWithTag("Menus"))
|
foreach (var menu in GameObject.FindGameObjectsWithTag("Interfaces"))
|
||||||
foreach (Transform menuChild in menu.transform)
|
foreach (Transform menuChild in menu.transform)
|
||||||
{
|
{
|
||||||
// disable the menu if it's currently active
|
// disable the menu if it's currently active
|
||||||
|
@ -146,7 +127,7 @@ private void PauseGameHelper(DisplayState incomingState)
|
||||||
HideMenuHelper();
|
HideMenuHelper();
|
||||||
|
|
||||||
// get all child menus in the "Menus" parent object
|
// get all child menus in the "Menus" parent object
|
||||||
foreach (var menuParent in GameObject.FindGameObjectsWithTag("Menus"))
|
foreach (var menuParent in GameObject.FindGameObjectsWithTag("Interfaces"))
|
||||||
foreach (Transform menu in menuParent.transform)
|
foreach (Transform menu in menuParent.transform)
|
||||||
{
|
{
|
||||||
// show the menu based on the incoming state
|
// show the menu based on the incoming state
|
||||||
|
@ -201,9 +182,6 @@ private void ResumeGameHelper(DisplayState incomingState)
|
||||||
/// <param name="displayState">the game menu to show</param>
|
/// <param name="displayState">the game menu to show</param>
|
||||||
public void SetDisplayState(DisplayState displayState)
|
public void SetDisplayState(DisplayState displayState)
|
||||||
{
|
{
|
||||||
// boolean check if we're transitioning to the same state
|
|
||||||
var transitioning = _state == displayState;
|
|
||||||
|
|
||||||
// check if the game is paused or not
|
// check if the game is paused or not
|
||||||
if (displayState is DisplayState.Game or DisplayState.UnassociatedState)
|
if (displayState is DisplayState.Game or DisplayState.UnassociatedState)
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,15 +71,12 @@ private void Update()
|
||||||
playerPosition.TransformDirection(Vector3.forward) * interactableDistance,
|
playerPosition.TransformDirection(Vector3.forward) * interactableDistance,
|
||||||
Color.green
|
Color.green
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!_raycast) return;
|
if (!_raycast) return;
|
||||||
|
|
||||||
// show an interaction prompt if we're looking at an interactable object
|
// show an interaction prompt if we're looking at an interactable object
|
||||||
var prompt = Hit.collider.GetComponent<CommonInteractable>()?.interactionPrompt;
|
var prompt = Hit.collider.GetComponent<CommonInteractable>()?.interactionPrompt;
|
||||||
if (prompt != "")
|
if (prompt != "") Debug.Log(prompt);
|
||||||
{
|
|
||||||
Debug.Log(prompt);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -7,7 +7,7 @@ TagManager:
|
||||||
- CinemachineTarget
|
- CinemachineTarget
|
||||||
- Interactable
|
- Interactable
|
||||||
- AIs
|
- AIs
|
||||||
- Menus
|
- Interfaces
|
||||||
layers:
|
layers:
|
||||||
- Default
|
- Default
|
||||||
- TransparentFX
|
- TransparentFX
|
||||||
|
|
Reference in a new issue