reverted to my old fps controller, stopped movement when in inventory UI

This commit is contained in:
0ceanSlim 2023-10-31 16:13:36 -04:00
parent 403743e42e
commit a55e58a15c
8 changed files with 245 additions and 59407 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: df36b73b5ab64ce449a6c93f4e92426f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -7,6 +7,7 @@ using UnityEngine.EventSystems;
// TODO: Expand for other measurement systems later
namespace SimpleInventorySystem
{
public enum Orientation { Portrait, Landscape };
@ -277,7 +278,8 @@ namespace SimpleInventorySystem
public StandaloneInputModule StandaloneInputModule;
public Vector2 MouseInCanvasPosition;
private ItemUI draggedItem;
public ItemUI DraggedItem {
public ItemUI DraggedItem
{
set { draggedItem = value; IsDraggingItem = true; }
get { return draggedItem; }
}

View File

@ -30,7 +30,7 @@ AnimatorController:
m_Controller: {fileID: 9100000}
--- !u!1102 &1102060906037765418
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -56,7 +56,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102069573352834654
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -82,7 +82,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102288116916373438
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -108,7 +108,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102300911017245718
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -134,7 +134,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102305440730686640
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -160,7 +160,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102325468427020440
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -186,7 +186,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102353304653917578
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -212,7 +212,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102388250116965612
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -238,7 +238,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102434451258002394
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -264,7 +264,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102457889129659086
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -290,7 +290,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102504370109820240
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -316,7 +316,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102507004449615598
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -342,7 +342,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102548263642349422
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -368,7 +368,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102553287756737930
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -394,7 +394,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102625270920372840
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -420,7 +420,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102734063504064660
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -446,7 +446,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102786086776954852
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -472,7 +472,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102789587843740596
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -498,7 +498,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102802829186204450
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -524,7 +524,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102861602908720136
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -550,7 +550,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102896380925422698
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -576,7 +576,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1102 &1102946914809509260
AnimatorState:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -602,7 +602,7 @@ AnimatorState:
m_TimeParameter:
--- !u!1107 &1107230291032181896
AnimatorStateMachine:
serializedVersion: 5
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -629,7 +629,7 @@ AnimatorStateMachine:
m_Position: {x: 108, y: 420, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102325468427020440}
m_Position: {x: 250, y: 120, z: 0}
m_Position: {x: 290, y: 110, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102734063504064660}
m_Position: {x: 108, y: 504, z: 0}

View File

@ -4963,7 +4963,7 @@ PrefabInstance:
type: 3}
propertyPath: m_Controller
value:
objectReference: {fileID: 0}
objectReference: {fileID: 9100000, guid: b0e26063876b35748825d92c95e566f6, type: 2}
- target: {fileID: 6138482526272820469, guid: 6ba61a3420417b5498f70a8a82e94b4c,
type: 3}
propertyPath: m_Name
@ -22022,87 +22022,87 @@ PrefabInstance:
- target: {fileID: 1408594462277226976, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1408594462277226976, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1408594462277226976, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 128
objectReference: {fileID: 0}
- target: {fileID: 1408594462277226976, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 950
objectReference: {fileID: 0}
- target: {fileID: 1408594462277226976, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -32
objectReference: {fileID: 0}
- target: {fileID: 1408611685023214182, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1408611685023214182, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1408611685023214182, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 882
objectReference: {fileID: 0}
- target: {fileID: 1408611685023214182, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 441
objectReference: {fileID: 0}
- target: {fileID: 1408859550583266152, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1408859550583266152, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1408859550583266152, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 882
objectReference: {fileID: 0}
- target: {fileID: 1408859550583266152, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 1459
objectReference: {fileID: 0}
- target: {fileID: 1409356609672223094, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1409356609672223094, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1409356609672223094, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 1900
objectReference: {fileID: 0}
- target: {fileID: 1409356609672223094, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 950
objectReference: {fileID: 0}
- target: {fileID: 1447913107573036620, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
@ -22112,132 +22112,132 @@ PrefabInstance:
- target: {fileID: 1807691572454453491, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1807691572454453491, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1807691572454453491, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 560
objectReference: {fileID: 0}
- target: {fileID: 1807691572454453491, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -180
objectReference: {fileID: 0}
- target: {fileID: 1867668761637123573, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1867668761637123573, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1867668761637123573, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 51
objectReference: {fileID: 0}
- target: {fileID: 1867668761637123573, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
value: 27
objectReference: {fileID: 0}
- target: {fileID: 1867668761637123573, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 25.5
objectReference: {fileID: 0}
- target: {fileID: 1867668761637123573, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -32
objectReference: {fileID: 0}
- target: {fileID: 1988206701526294328, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1988206701526294328, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1988206701526294328, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -312
objectReference: {fileID: 0}
- target: {fileID: 2089056032464391937, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2089056032464391937, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2089056032464391937, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -64
objectReference: {fileID: 0}
- target: {fileID: 2232433301505304132, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2232433301505304132, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2232433301505304132, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 40
objectReference: {fileID: 0}
- target: {fileID: 2232433301505304132, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
value: 32
objectReference: {fileID: 0}
- target: {fileID: 2232433301505304132, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 139
objectReference: {fileID: 0}
- target: {fileID: 2232433301505304132, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -32
objectReference: {fileID: 0}
- target: {fileID: 2238579897213640007, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2238579897213640007, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2238579897213640007, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 560
objectReference: {fileID: 0}
- target: {fileID: 2238579897213640007, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -90
objectReference: {fileID: 0}
- target: {fileID: 2407299031422499864, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
@ -22267,32 +22267,32 @@ PrefabInstance:
- target: {fileID: 2506667246830979239, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2506667246830979239, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2506667246830979239, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 19
objectReference: {fileID: 0}
- target: {fileID: 2506667246830979239, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
value: 27
objectReference: {fileID: 0}
- target: {fileID: 2506667246830979239, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 105.5
objectReference: {fileID: 0}
- target: {fileID: 2506667246830979239, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -32
objectReference: {fileID: 0}
- target: {fileID: 2563159083989969167, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
@ -22317,77 +22317,77 @@ PrefabInstance:
- target: {fileID: 2602382642329589456, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
value: -812
objectReference: {fileID: 0}
- target: {fileID: 2732489933285457465, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2732489933285457465, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2732489933285457465, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -496
objectReference: {fileID: 0}
- target: {fileID: 2736962325145547068, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2736962325145547068, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2736962325145547068, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -386
objectReference: {fileID: 0}
- target: {fileID: 2740434732417901359, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2740434732417901359, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2740434732417901359, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 300
objectReference: {fileID: 0}
- target: {fileID: 2740434732417901359, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -114
objectReference: {fileID: 0}
- target: {fileID: 2879539707650652387, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2879539707650652387, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2879539707650652387, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 300
objectReference: {fileID: 0}
- target: {fileID: 2879539707650652387, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -268
objectReference: {fileID: 0}
- target: {fileID: 2904504296557944687, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
@ -22397,52 +22397,52 @@ PrefabInstance:
- target: {fileID: 2916814997707983590, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2916814997707983590, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2916814997707983590, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -64
objectReference: {fileID: 0}
- target: {fileID: 3072563277687745674, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3072563277687745674, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3072563277687745674, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -262
objectReference: {fileID: 0}
- target: {fileID: 3498412931499760786, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3498412931499760786, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3498412931499760786, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 560
objectReference: {fileID: 0}
- target: {fileID: 3498412931499760786, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -40
objectReference: {fileID: 0}
- target: {fileID: 3762922561852127871, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
@ -22492,17 +22492,17 @@ PrefabInstance:
- target: {fileID: 4447923129738744490, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4447923129738744490, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4447923129738744490, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -138
objectReference: {fileID: 0}
- target: {fileID: 4616869207912762581, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
@ -22557,52 +22557,52 @@ PrefabInstance:
- target: {fileID: 4830382125522673913, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4830382125522673913, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4830382125522673913, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 320
objectReference: {fileID: 0}
- target: {fileID: 4830382125522673913, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 160
objectReference: {fileID: 0}
- target: {fileID: 4830382125522673913, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -298
objectReference: {fileID: 0}
- target: {fileID: 4830462787941415607, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4830462787941415607, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4830462787941415607, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 320
objectReference: {fileID: 0}
- target: {fileID: 4830462787941415607, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 160
objectReference: {fileID: 0}
- target: {fileID: 4830462787941415607, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -212
objectReference: {fileID: 0}
- target: {fileID: 4830786767943681919, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
@ -22627,27 +22627,27 @@ PrefabInstance:
- target: {fileID: 4830846566157826771, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4830846566157826771, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4830846566157826771, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 320
objectReference: {fileID: 0}
- target: {fileID: 4830846566157826771, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 160
objectReference: {fileID: 0}
- target: {fileID: 4830846566157826771, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -40
objectReference: {fileID: 0}
- target: {fileID: 4830881477751922405, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
@ -22712,27 +22712,27 @@ PrefabInstance:
- target: {fileID: 4831175392273697929, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4831175392273697929, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4831175392273697929, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 320
objectReference: {fileID: 0}
- target: {fileID: 4831175392273697929, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 160
objectReference: {fileID: 0}
- target: {fileID: 4831175392273697929, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -126
objectReference: {fileID: 0}
- target: {fileID: 4831193129931587363, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
@ -22837,17 +22837,17 @@ PrefabInstance:
- target: {fileID: 5574146452272886012, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5574146452272886012, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5574146452272886012, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -212
objectReference: {fileID: 0}
- target: {fileID: 5585426408668485169, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
@ -22872,7 +22872,7 @@ PrefabInstance:
- target: {fileID: 5891897148551660095, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
value: -584
objectReference: {fileID: 0}
- target: {fileID: 6081271360409295950, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
@ -23517,37 +23517,37 @@ PrefabInstance:
- target: {fileID: 7824151879811824291, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
value: 180
objectReference: {fileID: 0}
- target: {fileID: 8093442600702651224, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8093442600702651224, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8093442600702651224, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 37
objectReference: {fileID: 0}
- target: {fileID: 8093442600702651224, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
value: 27
objectReference: {fileID: 0}
- target: {fileID: 8093442600702651224, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 73.5
objectReference: {fileID: 0}
- target: {fileID: 8093442600702651224, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -32
objectReference: {fileID: 0}
- target: {fileID: 8269474541778066883, guid: 1fab8c9520621b84896290957c8ca856,
type: 3}
@ -25649,57 +25649,18 @@ GameObject:
m_Component:
- component: {fileID: 1216902018}
- component: {fileID: 1216902017}
- component: {fileID: 1216902016}
- component: {fileID: 1216902021}
- component: {fileID: 1216902022}
- component: {fileID: 1216902020}
- component: {fileID: 1216902019}
- component: {fileID: 1216902023}
m_Layer: 0
m_Name: Player
m_TagString: Player
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!114 &1216902016
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1216902015}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 03d5fb7d5c8127340bd77f0b93b04fcd, type: 3}
m_Name:
m_EditorClassIdentifier:
canSprint: 1
canJump: 1
canCrouch: 1
canUseHeadbob: 1
sprintKey: 304
jumpKey: 32
crouchKey: 99
walkSpeed: 3
sprintSpeed: 6
crouchSpeed: 1.5
lookSpeedX: 1.54
lookSpeedY: 1.54
upperLookLimit: 80
lowerLookLimit: 80
jumpForce: 8
gravity: 25
crouchHeight: 0.5
standingHeight: 2
timeToCrouch: 0.25
crouchingCenter: {x: 0, y: 0, z: 0}
standingCenter: {x: 0, y: 0, z: 0}
walkBobSpeed: 12
walkBobAmount: 0.05
sprintBobSpeed: 18
sprintBobAmount: 0.1
crouchBobSpeed: 8
crouchBobAmount: 0.025
m_IsActive: 1
--- !u!143 &1216902017
CharacterController:
m_ObjectHideFlags: 0
@ -25898,6 +25859,46 @@ CapsuleCollider:
m_Height: 1
m_Direction: 1
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &1216902023
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1216902015}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 03d5fb7d5c8127340bd77f0b93b04fcd, type: 3}
m_Name:
m_EditorClassIdentifier:
inventorySystem: {fileID: 1991142766}
canSprint: 1
canJump: 1
canCrouch: 1
canUseHeadbob: 1
sprintKey: 304
jumpKey: 32
crouchKey: 99
walkSpeed: 3
sprintSpeed: 6
crouchSpeed: 1.5
lookSpeedX: 2
lookSpeedY: 2
upperLookLimit: 80
lowerLookLimit: 80
jumpForce: 8
gravity: 30
crouchHeight: 0.5
standingHeight: 2
timeToCrouch: 0.25
crouchingCenter: {x: 0, y: 0.5, z: 0}
standingCenter: {x: 0, y: 0, z: 0}
walkBobSpeed: 14
walkBobAmount: 0.005
sprintBobSpeed: 18
sprintBobAmount: 0.05
crouchBobSpeed: 8
crouchBobAmount: 0.025
--- !u!1001 &1229802576
PrefabInstance:
m_ObjectHideFlags: 0
@ -39076,7 +39077,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &1938196911
Transform:
m_ObjectHideFlags: 0
@ -41298,6 +41299,18 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 97188a1bac9f59447a17a1a1d68134ab, type: 3}
--- !u!114 &1991142766 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2770326605790841687, guid: 9f005685dc17f4643b4a1156970fe2f6,
type: 3}
m_PrefabInstance: {fileID: 2770326605231792848}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 837ccd1b2c5ddff40944cdfedebde1a7, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1996558438
PrefabInstance:
m_ObjectHideFlags: 0

View File

@ -2,8 +2,12 @@
using System.Collections.Generic;
using UnityEngine;
using SimpleInventorySystem;
public class FirstPersonController : MonoBehaviour
{
public InventorySystem inventorySystem; // Reference to the InventorySystem script
// Start is called before the first frame update
public bool CanMove { get; private set; } = true;
private bool IsSprinting => canSprint && Input.GetKey(sprintKey);
@ -77,8 +81,18 @@ public class FirstPersonController : MonoBehaviour
// Update is called once per frame
void Update()
{
if (CanMove)
// Check if the inventory UI is open
bool isInventoryUIOpen = inventorySystem.IsUsingInventoryMenuUI();
if (isInventoryUIOpen)
{
// The inventory UI is open, disable movement
CanMove = false;
}
else
{
// The inventory UI is closed, enable movement
CanMove = true;
HandleMovementInput();
HandleMouseLook();
@ -95,6 +109,8 @@ public class FirstPersonController : MonoBehaviour
}
}
private void HandleMovementInput()
{
currentInput = new Vector2((isCrouching ? crouchSpeed : IsSprinting ? sprintSpeed : walkSpeed) * Input.GetAxis("Vertical"), (isCrouching ? crouchSpeed : IsSprinting ? sprintSpeed : walkSpeed) * Input.GetAxis("Horizontal"));