radial menu work
This commit is contained in:
@@ -118,9 +118,6 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_interactionPoint: {fileID: 5360312089705388636}
|
||||
_menuActions:
|
||||
- {fileID: 11400000, guid: a45b050119410f149b0a257098cdaec5, type: 2}
|
||||
- {fileID: 11400000, guid: 37a5860278daf904b976c61632085b3d, type: 2}
|
||||
--- !u!1 &4960435320984939974
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4333559281551512614
|
||||
--- !u!1 &2503703406324003186
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -8,7 +8,7 @@ GameObject:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1595984948554774838}
|
||||
- component: {fileID: 5198581480322368586}
|
||||
m_Layer: 0
|
||||
m_Name: InteractPoint
|
||||
m_TagString: Untagged
|
||||
@@ -16,22 +16,22 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1595984948554774838
|
||||
--- !u!4 &5198581480322368586
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4333559281551512614}
|
||||
m_GameObject: {fileID: 2503703406324003186}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
|
||||
m_LocalPosition: {x: -0, y: 0, z: 0.86}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7908616180235619651}
|
||||
m_RootOrder: -1
|
||||
m_Father: {fileID: 5091233431665616032}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
|
||||
--- !u!1 &5577632863133830020
|
||||
--- !u!1 &5906696617992380095
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -39,8 +39,9 @@ GameObject:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7908616180235619651}
|
||||
- component: {fileID: 738253190946143797}
|
||||
- component: {fileID: 5091233431665616032}
|
||||
- component: {fileID: 8394955389980605819}
|
||||
- component: {fileID: 2222905884256231104}
|
||||
m_Layer: 6
|
||||
m_Name: CashierDesk
|
||||
m_TagString: Untagged
|
||||
@@ -48,39 +49,63 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7908616180235619651
|
||||
--- !u!4 &5091233431665616032
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5577632863133830020}
|
||||
m_LocalRotation: {x: 0, y: -0.7071068, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 3.01, y: 0.064, z: 4.03}
|
||||
m_GameObject: {fileID: 5906696617992380095}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068}
|
||||
m_LocalPosition: {x: -3.32, y: 0.064, z: 1.75}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1595984948554774838}
|
||||
- {fileID: 236322353151543006}
|
||||
- {fileID: 5263837543333092293}
|
||||
- {fileID: 5198581480322368586}
|
||||
- {fileID: 6363007320550542106}
|
||||
- {fileID: 782517165151960441}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: -1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: -90, z: 0}
|
||||
--- !u!114 &738253190946143797
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
|
||||
--- !u!114 &8394955389980605819
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5577632863133830020}
|
||||
m_GameObject: {fileID: 5906696617992380095}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2b3df7729a1cd4e479add673fa0f9b76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_interactionPoint: {fileID: 1595984948554774838}
|
||||
_interactionPoint: {fileID: 5198581480322368586}
|
||||
_containerSO: {fileID: 11400000, guid: e3d520733a0700b4f8ec3baae6be6e76, type: 2}
|
||||
--- !u!1 &8562307062121537200
|
||||
_jobsInfoList:
|
||||
- {fileID: 11400000, guid: c7452dc6dfb2cc040a6d0e543db6b671, type: 2}
|
||||
- {fileID: 11400000, guid: 4381db145ac80514c957374e20392b3b, type: 2}
|
||||
--- !u!65 &2222905884256231104
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5906696617992380095}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 2.5, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0.5, z: -0.2}
|
||||
--- !u!1 &6044091029413625235
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -88,8 +113,8 @@ GameObject:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5263837543333092293}
|
||||
- component: {fileID: 2369538501029799684}
|
||||
- component: {fileID: 782517165151960441}
|
||||
- component: {fileID: 8022441462284330525}
|
||||
m_Layer: 0
|
||||
m_Name: Selected
|
||||
m_TagString: Untagged
|
||||
@@ -97,44 +122,44 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5263837543333092293
|
||||
--- !u!4 &782517165151960441
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8562307062121537200}
|
||||
m_GameObject: {fileID: 6044091029413625235}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1.01, y: 1.01, z: 1.01}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2860292787442305421}
|
||||
m_Father: {fileID: 7908616180235619651}
|
||||
m_RootOrder: -1
|
||||
- {fileID: 8099557976220433163}
|
||||
m_Father: {fileID: 5091233431665616032}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2369538501029799684
|
||||
--- !u!114 &8022441462284330525
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8562307062121537200}
|
||||
m_GameObject: {fileID: 6044091029413625235}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 70ee3205d7b15b4449cdacc7a726e220, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_selectedObject: {fileID: 738253190946143797}
|
||||
_selectedObject: {fileID: 8394955389980605819}
|
||||
visualGameObjectArray:
|
||||
- {fileID: 3240935378234643255}
|
||||
--- !u!1001 &345981747234103605
|
||||
- {fileID: 8875673184640999857}
|
||||
--- !u!1001 &6901564185279032561
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 7908616180235619651}
|
||||
m_TransformParent: {fileID: 5091233431665616032}
|
||||
m_Modifications:
|
||||
- target: {fileID: -8679921383154817045, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
@@ -221,19 +246,19 @@ PrefabInstance:
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19, type: 3}
|
||||
--- !u!4 &236322353151543006 stripped
|
||||
--- !u!4 &6363007320550542106 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 345981747234103605}
|
||||
m_PrefabInstance: {fileID: 6901564185279032561}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &2322577987492458086
|
||||
--- !u!1001 &8641792429062724832
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 5263837543333092293}
|
||||
m_TransformParent: {fileID: 782517165151960441}
|
||||
m_Modifications:
|
||||
- target: {fileID: -8679921383154817045, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
@@ -307,7 +332,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -7302266176260696394, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: -6426683491669544001, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
@@ -317,7 +342,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -5790572004517677739, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: -3778644264426962316, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
@@ -337,12 +362,12 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -1967409702050060617, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 709836907326415655, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 919132149155446097, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
@@ -357,7 +382,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1448251376591014322, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 1953498597412962960, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
@@ -377,42 +402,42 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3677807008490989325, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 3677807008490989325, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[1]
|
||||
propertyPath: 'm_Materials.Array.data[1]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 3677807008490989325, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[2]
|
||||
propertyPath: 'm_Materials.Array.data[2]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 3677807008490989325, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[3]
|
||||
propertyPath: 'm_Materials.Array.data[3]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 3677807008490989325, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[4]
|
||||
propertyPath: 'm_Materials.Array.data[4]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 3677807008490989325, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[5]
|
||||
propertyPath: 'm_Materials.Array.data[5]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 3677807008490989325, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[6]
|
||||
propertyPath: 'm_Materials.Array.data[6]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 5008022236170083033, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 5481682735181526959, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
@@ -432,7 +457,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5986607408358045277, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 6876512513541962555, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
@@ -450,15 +475,15 @@ PrefabInstance:
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19, type: 3}
|
||||
--- !u!4 &2860292787442305421 stripped
|
||||
--- !u!4 &8099557976220433163 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 2322577987492458086}
|
||||
m_PrefabInstance: {fileID: 8641792429062724832}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &3240935378234643255 stripped
|
||||
--- !u!1 &8875673184640999857 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: a2490cb1fa8b6cd49a5622fd0a0a5d19,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 2322577987492458086}
|
||||
m_PrefabInstance: {fileID: 8641792429062724832}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88fcb1c95eeeabc479f95a580dea8152
|
||||
guid: 9b71b0a8f71c7b04fb23f0c7662a5800
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
@@ -24,6 +24,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 168138392062545361}
|
||||
serializedVersion: 2
|
||||
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}
|
||||
@@ -31,7 +32,6 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 3189055360597018460}
|
||||
m_Father: {fileID: 168138393772344589}
|
||||
m_RootOrder: -1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &168138392062545363
|
||||
MonoBehaviour:
|
||||
@@ -42,16 +42,12 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 168138392062545361}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c67621cbedb3453428fcc7207806f507, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 70ee3205d7b15b4449cdacc7a726e220, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_selectedObject: {fileID: 6848154005436947124}
|
||||
visualGameObjectArray:
|
||||
- {fileID: 8851295400845817647}
|
||||
- {fileID: 5221702895947051165}
|
||||
- {fileID: 7466084613389346756}
|
||||
- {fileID: 601078070900713458}
|
||||
- {fileID: 8274025719420812795}
|
||||
--- !u!1 &168138393772344594
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -77,6 +73,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 168138393772344594}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: -0, y: 0, z: 8.643}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
@@ -86,7 +83,6 @@ Transform:
|
||||
- {fileID: 3189055359718030621}
|
||||
- {fileID: 168138392062545360}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: -1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
|
||||
--- !u!65 &168138393772344588
|
||||
BoxCollider:
|
||||
@@ -123,7 +119,6 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
_interactionPoint: {fileID: 3909525920100175952}
|
||||
_containerSO: {fileID: 11400000, guid: b8fcf00b76085f54baafb32a2e47c70e, type: 2}
|
||||
_actionsMenu: {fileID: 0}
|
||||
--- !u!1 &677083019419746855
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -147,13 +142,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 677083019419746855}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 1, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 168138393772344589}
|
||||
m_RootOrder: -1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &168138392263420887
|
||||
PrefabInstance:
|
||||
@@ -180,7 +175,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 679769156345600598, guid: b9f258a086096d24aa7861fa20deed65,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 721189090810596389, guid: b9f258a086096d24aa7861fa20deed65,
|
||||
@@ -245,7 +240,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3125761486870820617, guid: b9f258a086096d24aa7861fa20deed65,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 3224912872851930775, guid: b9f258a086096d24aa7861fa20deed65,
|
||||
@@ -340,7 +335,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4142751530299969736, guid: b9f258a086096d24aa7861fa20deed65,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 4270458382938451909, guid: b9f258a086096d24aa7861fa20deed65,
|
||||
@@ -385,7 +380,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5999052097307758745, guid: b9f258a086096d24aa7861fa20deed65,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 6049992317567785248, guid: b9f258a086096d24aa7861fa20deed65,
|
||||
@@ -445,7 +440,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7409767690702518049, guid: b9f258a086096d24aa7861fa20deed65,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 7630520031127733399, guid: b9f258a086096d24aa7861fa20deed65,
|
||||
@@ -516,36 +511,12 @@ PrefabInstance:
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: b9f258a086096d24aa7861fa20deed65, type: 3}
|
||||
--- !u!1 &601078070900713458 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 721189090810596389, guid: b9f258a086096d24aa7861fa20deed65,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 168138392263420887}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!4 &3189055360597018460 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 3320441614581083275, guid: b9f258a086096d24aa7861fa20deed65,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 168138392263420887}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &5221702895947051165 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 5341955133804256074, guid: b9f258a086096d24aa7861fa20deed65,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 168138392263420887}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &7466084613389346756 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 7334539273898789907, guid: b9f258a086096d24aa7861fa20deed65,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 168138392263420887}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &8274025719420812795 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 8108280843827582508, guid: b9f258a086096d24aa7861fa20deed65,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 168138392263420887}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &8851295400845817647 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 8683862293970279672, guid: b9f258a086096d24aa7861fa20deed65,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7df4c91b7961f794da5a651e64cc8ac5
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+14
-14
@@ -23,6 +23,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2187401395794107813}
|
||||
serializedVersion: 2
|
||||
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}
|
||||
@@ -34,7 +35,6 @@ Transform:
|
||||
- {fileID: 3817088591402153792}
|
||||
- {fileID: 5758192913903100151}
|
||||
m_Father: {fileID: 8971066017072020675}
|
||||
m_RootOrder: 8
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &6505436423156819183
|
||||
GameObject:
|
||||
@@ -59,6 +59,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6505436423156819183}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1.01, y: 1.01, z: 1.01}
|
||||
@@ -70,7 +71,6 @@ Transform:
|
||||
- {fileID: 7813808546752602790}
|
||||
- {fileID: 3370995579278654850}
|
||||
m_Father: {fileID: 6391247632089868869}
|
||||
m_RootOrder: -1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &468327407655342065
|
||||
PrefabInstance:
|
||||
@@ -152,7 +152,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 296305536932351084, guid: 9f2ba6d178afac24fa9de3f9e851bf13,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 919132149155446097, guid: 9f2ba6d178afac24fa9de3f9e851bf13,
|
||||
@@ -163,7 +163,7 @@ PrefabInstance:
|
||||
- target: {fileID: 919132149155446097, guid: 9f2ba6d178afac24fa9de3f9e851bf13,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects:
|
||||
@@ -227,7 +227,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2369538501029799684, guid: bb469c3bf9d2c0f45be39b5b5a6ecfad,
|
||||
type: 3}
|
||||
propertyPath: visualGameObjectArray.Array.data[0]
|
||||
propertyPath: 'visualGameObjectArray.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 6505436423156819183}
|
||||
- target: {fileID: 5577632863133830020, guid: bb469c3bf9d2c0f45be39b5b5a6ecfad,
|
||||
@@ -481,7 +481,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 296305536932351084, guid: 9f2ba6d178afac24fa9de3f9e851bf13,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 919132149155446097, guid: 9f2ba6d178afac24fa9de3f9e851bf13,
|
||||
@@ -492,7 +492,7 @@ PrefabInstance:
|
||||
- target: {fileID: 919132149155446097, guid: 9f2ba6d178afac24fa9de3f9e851bf13,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects:
|
||||
@@ -666,7 +666,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 296305536932351084, guid: 9f2ba6d178afac24fa9de3f9e851bf13,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 919132149155446097, guid: 9f2ba6d178afac24fa9de3f9e851bf13,
|
||||
@@ -677,11 +677,11 @@ PrefabInstance:
|
||||
- target: {fileID: 919132149155446097, guid: 9f2ba6d178afac24fa9de3f9e851bf13,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3336182266008515235, guid: 9f2ba6d178afac24fa9de3f9e851bf13,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
m_RemovedComponents: []
|
||||
@@ -1094,7 +1094,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 296305536932351084, guid: 9f2ba6d178afac24fa9de3f9e851bf13,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 919132149155446097, guid: 9f2ba6d178afac24fa9de3f9e851bf13,
|
||||
@@ -1105,7 +1105,7 @@ PrefabInstance:
|
||||
- target: {fileID: 919132149155446097, guid: 9f2ba6d178afac24fa9de3f9e851bf13,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects:
|
||||
@@ -1199,7 +1199,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 296305536932351084, guid: 9f2ba6d178afac24fa9de3f9e851bf13,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 710613883f6dfb64889bf6134b4b15e3, type: 2}
|
||||
- target: {fileID: 919132149155446097, guid: 9f2ba6d178afac24fa9de3f9e851bf13,
|
||||
@@ -1210,7 +1210,7 @@ PrefabInstance:
|
||||
- target: {fileID: 919132149155446097, guid: 9f2ba6d178afac24fa9de3f9e851bf13,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects:
|
||||
File diff suppressed because it is too large
Load Diff
+308
-2655
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,6 @@
|
||||
|
||||
public enum JobPositions { Unemployed, Cashier, Clerk, ManagerAssistaint, Manager };
|
||||
public enum EducationSkill { NotEducated, School, HightSchool, University };
|
||||
public enum RadialMenuActions { Cancel, Sleep, Eat, Put, Take }
|
||||
public enum PlayerStates { Awake, Sleeping, Eating, Working }
|
||||
public enum StatsId { Money, RentAccount, Food, Energy, BankAccount, Job, }
|
||||
public enum Tasks { Move, Interact, Rotate };
|
||||
@@ -22,4 +21,16 @@ public enum AnimationStates
|
||||
[EnumMember(Value = "SitToStand")]
|
||||
[BlockingAnimation]
|
||||
Standing
|
||||
};
|
||||
};
|
||||
|
||||
public enum RadialMenuActions {
|
||||
Cancel,
|
||||
Sleep,
|
||||
Eat,
|
||||
Put,
|
||||
Take,
|
||||
Work,
|
||||
Talk,
|
||||
Buy ,
|
||||
Open
|
||||
}
|
||||
@@ -2,23 +2,44 @@
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
public class BaseInteractableObject : MonoBehaviour
|
||||
public abstract class BaseInteractableObject : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
public Transform _interactionPoint;
|
||||
[SerializeField]
|
||||
public List<RadialMenuActionSO> _menuActions;
|
||||
|
||||
protected Dictionary<RadialMenuActions, RadialMenuActionDescription> _menuActions = new();
|
||||
private RadialMenuActions _selectedAction;
|
||||
protected Player _player;
|
||||
private InteractionStatus _currentStatus = InteractionStatus.None;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
|
||||
_menuActions = new Dictionary<RadialMenuActions, RadialMenuActionDescription>
|
||||
{
|
||||
{ RadialMenuActions.Buy, new RadialMenuActionDescription() { Description = "Buy", IsEnabled = false } },
|
||||
{ RadialMenuActions.Sleep, new RadialMenuActionDescription() { Description = "Sleep", IsEnabled = false } },
|
||||
{ RadialMenuActions.Talk, new RadialMenuActionDescription() { Description = "Talk", IsEnabled = false } },
|
||||
{ RadialMenuActions.Put, new RadialMenuActionDescription() { Description = "Put", IsEnabled = false } },
|
||||
{ RadialMenuActions.Take, new RadialMenuActionDescription() { Description = "Take", IsEnabled = false } },
|
||||
{ RadialMenuActions.Work, new RadialMenuActionDescription() { Description = "Work", IsEnabled = false } },
|
||||
{ RadialMenuActions.Eat, new RadialMenuActionDescription() { Description = "Eat", IsEnabled = false } },
|
||||
{ RadialMenuActions.Open, new RadialMenuActionDescription() { Description = "Open", IsEnabled = false } },
|
||||
{ RadialMenuActions.Cancel, new RadialMenuActionDescription() { Description = "Cancel", IsEnabled = true } },
|
||||
};
|
||||
}
|
||||
|
||||
public InteractionStatus Interact(Player player)
|
||||
{
|
||||
_player = player;
|
||||
|
||||
PrepareMenuActions();
|
||||
|
||||
switch (_currentStatus)
|
||||
{
|
||||
case InteractionStatus.None when _menuActions.Any():
|
||||
UIManager.Instance.ShowItemsMenu(_menuActions, PopupMenuCallback);
|
||||
case InteractionStatus.None:
|
||||
var filteredActions = _menuActions.Where(x => x.Value.IsEnabled).ToDictionary(i => i.Key, i => i.Value) ;
|
||||
UIManager.Instance.ShowItemsMenu(filteredActions, PopupMenuCallback);
|
||||
_currentStatus = InteractionStatus.WaitForChoose;
|
||||
break;
|
||||
case InteractionStatus.Complete:
|
||||
@@ -29,7 +50,7 @@ public class BaseInteractableObject : MonoBehaviour
|
||||
{
|
||||
if (_player.IsPathComplete(_interactionPoint.position))
|
||||
{
|
||||
InteractAction();
|
||||
InteractAction(_selectedAction);
|
||||
_currentStatus = InteractionStatus.None;
|
||||
return InteractionStatus.Complete;
|
||||
}
|
||||
@@ -43,20 +64,20 @@ public class BaseInteractableObject : MonoBehaviour
|
||||
return _currentStatus;
|
||||
}
|
||||
|
||||
private void PopupMenuCallback(RadialMenuActionSO action)
|
||||
private void PopupMenuCallback(RadialMenuActions action)
|
||||
{
|
||||
if (action.Action == RadialMenuActions.Cancel)
|
||||
if (action == RadialMenuActions.Cancel)
|
||||
{
|
||||
_currentStatus = InteractionStatus.Complete;
|
||||
}
|
||||
else
|
||||
{
|
||||
_selectedAction= action;
|
||||
_currentStatus = InteractionStatus.InProgress;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void InteractAction()
|
||||
{
|
||||
protected abstract void InteractAction(RadialMenuActions interactAction);
|
||||
|
||||
}
|
||||
protected abstract void PrepareMenuActions();
|
||||
}
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
public class Bed : BaseInteractableObject
|
||||
{
|
||||
|
||||
protected override void InteractAction()
|
||||
protected override void PrepareMenuActions()
|
||||
{
|
||||
_menuActions[RadialMenuActions.Sleep].IsEnabled = true;
|
||||
}
|
||||
|
||||
protected override void InteractAction(RadialMenuActions interactAction)
|
||||
{
|
||||
_player.SetPlayerAnimation(AnimationStates.Sitting, OnAnimationFinished);
|
||||
}
|
||||
|
||||
private void OnAnimationFinished()
|
||||
{
|
||||
UIManager.Instance.ShowTimeSliderDialog("Go to sleep", "Sleep until", OnCancel, OnConfirm);
|
||||
|
||||
@@ -11,26 +11,43 @@ public class CashierDesk : BaseInteractableObject
|
||||
private List<JobInfoSO> _jobsInfoList;
|
||||
private JobInfoSO _playerJob;
|
||||
|
||||
protected override void InteractAction()
|
||||
private bool CheckIfPlayerHaveItems()
|
||||
{
|
||||
if (_player.IsHoldContainerItem())
|
||||
{
|
||||
BuyItems();
|
||||
var playerContainer = _player.GetContainerItem();
|
||||
if (playerContainer.IsSalebleItems())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_playerJob = _jobsInfoList.Where(x => x.JobPosition == _player.JobPosition).FirstOrDefault();
|
||||
print($"playerJob is {_playerJob}");
|
||||
if (_playerJob != null)
|
||||
{
|
||||
UIManager.Instance.ShowTimeSliderDialog($"Work", $"Work as {_playerJob.Description}", OnCancel, OnConfirm);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print("You don't work here");
|
||||
}
|
||||
}
|
||||
protected override void PrepareMenuActions()
|
||||
{
|
||||
_playerJob = _jobsInfoList.Where(x => x.JobPosition == _player.JobPosition).FirstOrDefault();
|
||||
if (_playerJob != null)
|
||||
_menuActions[RadialMenuActions.Work].IsEnabled = true;
|
||||
|
||||
_menuActions[RadialMenuActions.Buy].IsEnabled = CheckIfPlayerHaveItems();
|
||||
|
||||
}
|
||||
|
||||
protected override void InteractAction(RadialMenuActions interactAction)
|
||||
{
|
||||
switch (interactAction)
|
||||
{
|
||||
case RadialMenuActions.Buy:
|
||||
BuyItems();
|
||||
break;
|
||||
case RadialMenuActions.Work:
|
||||
UIManager.Instance.ShowTimeSliderDialog($"Work", $"Work as {_playerJob.Description}", OnCancel, OnConfirm);
|
||||
break;
|
||||
default:
|
||||
print("unknown action");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void BuyItems()
|
||||
|
||||
@@ -17,7 +17,12 @@ public class Door : BaseInteractableObject
|
||||
|
||||
}
|
||||
|
||||
protected override void InteractAction()
|
||||
protected override void PrepareMenuActions()
|
||||
{
|
||||
_menuActions[RadialMenuActions.Open].IsEnabled = true;
|
||||
}
|
||||
|
||||
protected override void InteractAction(RadialMenuActions interactAction)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(_exitName))
|
||||
{
|
||||
|
||||
@@ -7,18 +7,34 @@ public class Fridge : BaseInteractableObject
|
||||
{
|
||||
[SerializeField]
|
||||
private ContainerSO _containerSO;
|
||||
[SerializeField]
|
||||
//private ItemActionsUI _actionsMenu;
|
||||
|
||||
|
||||
private List<FoodItemSO> _foodObjects = new List<FoodItemSO>();
|
||||
|
||||
protected override void InteractAction()
|
||||
{
|
||||
private bool CheckIfPlayerHaveItems()
|
||||
{
|
||||
if (_player.IsHoldContainerItem())
|
||||
{
|
||||
var playerContainer = _player.GetContainerItem();
|
||||
if (!playerContainer.IsSalebleItems())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override void PrepareMenuActions()
|
||||
{
|
||||
_menuActions[RadialMenuActions.Put].IsEnabled = CheckIfPlayerHaveItems();
|
||||
_menuActions[RadialMenuActions.Eat].IsEnabled = _foodObjects.Count > 0;
|
||||
}
|
||||
|
||||
protected override void InteractAction(RadialMenuActions interactAction)
|
||||
{
|
||||
switch (interactAction)
|
||||
{
|
||||
case RadialMenuActions.Put:
|
||||
var playerContainer = _player.GetContainerItem();
|
||||
if (_foodObjects.Count + playerContainer.GetItems().Count <= _containerSO.MaxCapacity)
|
||||
{
|
||||
foreach (FoodItemSO item in playerContainer.GetItems())
|
||||
@@ -31,19 +47,13 @@ public class Fridge : BaseInteractableObject
|
||||
}
|
||||
else
|
||||
Debug.Log($"Fridge is full");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Eat menu
|
||||
if (_foodObjects.Count > 0)
|
||||
{
|
||||
break;
|
||||
case RadialMenuActions.Eat:
|
||||
var hunger = _player.Stats[StatsId.Food].MaxValue - _player.Stats[StatsId.Food].Value;
|
||||
var eatingItems = _foodObjects.Count < (hunger / 10) ? _foodObjects.Count : (hunger / 10);
|
||||
StartCoroutine(EatRoutine(eatingItems));
|
||||
_foodObjects.RemoveRange(0, (int)eatingItems);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using static UnityEditor.Experimental.GraphView.GraphView;
|
||||
|
||||
public class OfficeTable : BaseInteractableObject
|
||||
{
|
||||
[SerializeField]
|
||||
private JobsListSO _jobPositionsSO;
|
||||
|
||||
protected override void InteractAction()
|
||||
protected override void PrepareMenuActions()
|
||||
{
|
||||
_menuActions[RadialMenuActions.Talk].IsEnabled = true;
|
||||
}
|
||||
|
||||
protected override void InteractAction(RadialMenuActions interactAction)
|
||||
{
|
||||
UIManager.Instance.ShowJobSelectionDialog("Job agency", null, OnConfirm);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
public class RadialMenuActionDescription
|
||||
{
|
||||
public bool IsEnabled { get; set; }
|
||||
public string Description { get; set; }
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 844a7de838b26b349aac023a7c8057d6
|
||||
guid: c6bfbb59bd3f3234e947cc44069cfe7d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -4,21 +4,22 @@ public class ShopingContainer : BaseInteractableObject
|
||||
{
|
||||
[SerializeField]
|
||||
private ContainerSO _containerSO;
|
||||
[SerializeField]
|
||||
//private ItemActionsUI _actionsMenu;
|
||||
|
||||
protected override void InteractAction()
|
||||
protected override void PrepareMenuActions()
|
||||
{
|
||||
if (!_player.IsHoldContainerItem())
|
||||
_menuActions[RadialMenuActions.Take].IsEnabled = true;
|
||||
}
|
||||
|
||||
protected override void InteractAction(RadialMenuActions interactAction)
|
||||
{
|
||||
var transform = Instantiate(_containerSO.prefab, _interactionPoint);
|
||||
var containerItem = transform.GetComponent<ContainerItem>();
|
||||
if (containerItem == null)
|
||||
{
|
||||
var transform = Instantiate(_containerSO.prefab, _interactionPoint);
|
||||
var containerItem = transform.GetComponent<ContainerItem>();
|
||||
if (containerItem == null)
|
||||
{
|
||||
Debug.LogError("Container Item is null");
|
||||
return;
|
||||
}
|
||||
_player.SetContainerItem(containerItem);
|
||||
Debug.LogError("Container Item is null");
|
||||
return;
|
||||
}
|
||||
_player.SetContainerItem(containerItem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,14 +6,16 @@ public class StoreContainer : BaseInteractableObject
|
||||
[SerializeField]
|
||||
private SellableItemSO _sellableItemSO;
|
||||
|
||||
protected override void InteractAction()
|
||||
protected override void PrepareMenuActions()
|
||||
{
|
||||
if (_player.IsHoldContainerItem())
|
||||
{
|
||||
var clone = Instantiate(_sellableItemSO);
|
||||
_menuActions[RadialMenuActions.Take].IsEnabled = _player.IsHoldContainerItem();
|
||||
}
|
||||
|
||||
var container = _player.GetContainerItem();
|
||||
container.AddItem(clone);
|
||||
}
|
||||
protected override void InteractAction(RadialMenuActions interactAction)
|
||||
{
|
||||
var clone = Instantiate(_sellableItemSO);
|
||||
|
||||
var container = _player.GetContainerItem();
|
||||
container.AddItem(clone);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,4 +10,12 @@ public class WaypointVisual : BaseInteractableObject
|
||||
_interactionPoint.position = position;
|
||||
_particleSystem.Play();
|
||||
}
|
||||
|
||||
protected override void InteractAction(RadialMenuActions interactAction)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void PrepareMenuActions()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu()]
|
||||
public class RadialMenuActionSO : ScriptableObject
|
||||
{
|
||||
public string ActionName;
|
||||
public RadialMenuActions Action;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 844a7de838b26b349aac023a7c8057d6, type: 3}
|
||||
m_Name: Buy
|
||||
m_EditorClassIdentifier:
|
||||
ActionName: Buy
|
||||
Action: 7
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c9ce62334c9d8334d813197661a59227
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 844a7de838b26b349aac023a7c8057d6, type: 3}
|
||||
m_Name: Talk
|
||||
m_EditorClassIdentifier:
|
||||
ActionName: Talk
|
||||
Action: 6
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 82dbb912f2c862b40b39813703894e50
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 844a7de838b26b349aac023a7c8057d6, type: 3}
|
||||
m_Name: Work
|
||||
m_EditorClassIdentifier:
|
||||
ActionName: Work
|
||||
Action: 5
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 71be1340ac987bc40bd4b01367b3abf5
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
@@ -8,10 +9,10 @@ public class RadialMenuItem : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private Button _radialMenuItemPrefab;
|
||||
private Action<RadialMenuActionSO> _menuButtonClick=null;
|
||||
List<RadialMenuActionSO> _actions;
|
||||
private Action<RadialMenuActions> _menuButtonClick=null;
|
||||
private Dictionary<RadialMenuActions, RadialMenuActionDescription> _actions;
|
||||
|
||||
public void ShowButtons(List<RadialMenuActionSO> actions, Action<RadialMenuActionSO> menuButtonClick)
|
||||
public void ShowButtons(Dictionary<RadialMenuActions, RadialMenuActionDescription> actions, Action<RadialMenuActions> menuButtonClick)
|
||||
{
|
||||
_actions = actions;
|
||||
_menuButtonClick = menuButtonClick;
|
||||
@@ -28,19 +29,19 @@ public class RadialMenuItem : MonoBehaviour
|
||||
var textMeshPro = button.GetComponentInChildren<TextMeshProUGUI>();
|
||||
if (textMeshPro != null)
|
||||
{
|
||||
textMeshPro.text = actions[buttonsCount].ActionName;
|
||||
textMeshPro.text = actions.ElementAt(buttonsCount).Value.Description;
|
||||
}
|
||||
|
||||
AddEvent(button, buttonsCount);
|
||||
}
|
||||
}
|
||||
|
||||
void AddEvent(Button b, int i)
|
||||
void AddEvent(Button b, int buttonNumber)
|
||||
{
|
||||
b.onClick.AddListener(() =>
|
||||
{
|
||||
Hide();
|
||||
_menuButtonClick?.Invoke(_actions[i]);
|
||||
_menuButtonClick?.Invoke(_actions.ElementAt(buttonNumber).Key);
|
||||
CloseDialog();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class UIManager : MonoBehaviour
|
||||
jobSelector.ShowJobSelectionDialog(title, onCancel, onConfirm);
|
||||
}
|
||||
|
||||
public void ShowItemsMenu(List<RadialMenuActionSO> actions,Action<RadialMenuActionSO> itemsMenuCallback)
|
||||
public void ShowItemsMenu(Dictionary<RadialMenuActions, RadialMenuActionDescription> actions,Action<RadialMenuActions> itemsMenuCallback)
|
||||
{
|
||||
var popupMenu = Instantiate(_radialMenuItemPrefab);
|
||||
popupMenu.transform.transform.SetParent(transform, false);
|
||||
|
||||
Reference in New Issue
Block a user