auto code cleanup by rider
add arms to player new animations for idle and walking some light adjustmentsmaster
parent
f28dfac4a7
commit
b14d4a74f5
@ -0,0 +1,403 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1001 &255561601163356063
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransformParent: {fileID: 5601814591316704436}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 433585800057296854, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 867046696110709345, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: 'm_Materials.Array.data[0]'
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 2100000, guid: 1a0afd856a35421469b28b916116fd9c, type: 2}
|
||||||
|
- target: {fileID: 4472461010448373620, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282922, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: Selected
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalScale.x
|
||||||
|
value: 1.01
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalScale.y
|
||||||
|
value: 1.01
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalScale.z
|
||||||
|
value: 1.01
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_ConstrainProportionsScale
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_RemovedGameObjects:
|
||||||
|
- {fileID: 433585800057296854, guid: e21b499d164095947b7559f0267f0e63, type: 3}
|
||||||
|
m_AddedGameObjects: []
|
||||||
|
m_AddedComponents:
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 4589716710238282922, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 8305292503786409097}
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: e21b499d164095947b7559f0267f0e63, type: 3}
|
||||||
|
--- !u!4 &4339812989839278900 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 255561601163356063}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1 &4339812989839278901 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 4589716710238282922, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 255561601163356063}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!114 &8305292503786409097
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4339812989839278901}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 8b85903dace450642b90692dcac31e5f, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
baseCounter: {fileID: 6149191602313750023}
|
||||||
|
visualGameObjectArray:
|
||||||
|
- {fileID: 4439054428546085099}
|
||||||
|
--- !u!1 &4439054428546085099 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 4472461010448373620, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 255561601163356063}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1001 &1382485272520623850
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransformParent: {fileID: 5601814591316704436}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 4209427294098384268, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalScale.x
|
||||||
|
value: 0.9
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4209427294098384268, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalScale.y
|
||||||
|
value: 0.9
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4209427294098384268, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalScale.z
|
||||||
|
value: 0.9
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282922, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: PlatesCounter_Visual
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7606527428084913573, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Color.b
|
||||||
|
value: 0.8349486
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7606527428084913573, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Color.g
|
||||||
|
value: 0.24056602
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7606527428084913573, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Color.r
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_RemovedGameObjects: []
|
||||||
|
m_AddedGameObjects: []
|
||||||
|
m_AddedComponents:
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 4589716710238282922, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 6955782007593168964}
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: e21b499d164095947b7559f0267f0e63, type: 3}
|
||||||
|
--- !u!1 &3215112737149444672 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 4589716710238282922, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 1382485272520623850}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!114 &6955782007593168964
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3215112737149444672}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: a0cb3d96f99e08d4a8763ab3d9a342a9, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
platesCounter: {fileID: 6149191602313750023}
|
||||||
|
counterTopPoint: {fileID: 1837259964514268949}
|
||||||
|
plateVisualPrefab: {fileID: 3812876574508226176, guid: c0c9afd619b40914a8f625c0535e2284,
|
||||||
|
type: 3}
|
||||||
|
--- !u!4 &3215112737149444673 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 4589716710238282923, guid: e21b499d164095947b7559f0267f0e63,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 1382485272520623850}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1001 &3341010752421754274
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransformParent: {fileID: 0}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 160166231906081607, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: PlatesCounter
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7196755653897210134, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: -1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7196755653897210134, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7196755653897210134, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7196755653897210134, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7196755653897210134, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7196755653897210134, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7196755653897210134, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: -1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7196755653897210134, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7196755653897210134, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7196755653897210134, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: -180
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7196755653897210134, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_RemovedGameObjects: []
|
||||||
|
m_AddedGameObjects:
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 7196755653897210134, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 3215112737149444673}
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 7196755653897210134, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 4339812989839278900}
|
||||||
|
m_AddedComponents:
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 160166231906081607, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 6149191602313750023}
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: baedeb81787a01d4d84373499280a841, type: 3}
|
||||||
|
--- !u!4 &1837259964514268949 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 3972990330611991223, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 3341010752421754274}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1 &3198859503577444069 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 160166231906081607, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 3341010752421754274}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!114 &6149191602313750023
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3198859503577444069}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 087b0f0f42cbf5541a19f1be77fb325f, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
counterTopPoint: {fileID: 1837259964514268949}
|
||||||
|
spawnPlateTimerMax: 4
|
||||||
|
platesSpawnedAmountMax: 4
|
||||||
|
plateKitchenObjectSO: {fileID: 11400000, guid: ae22a33de916036479453fdaf08141f5,
|
||||||
|
type: 2}
|
||||||
|
--- !u!4 &5601814591316704436 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 7196755653897210134, guid: baedeb81787a01d4d84373499280a841,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 3341010752421754274}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8df6b47059a3e0443a2270730177c081
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -0,0 +1,127 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &7442270590279185670
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4552451234056415784}
|
||||||
|
- component: {fileID: 7783792117560408132}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Plate
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4552451234056415784
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7442270590279185670}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0.13, y: 1.11, z: 2.81}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 1587899386476239244}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &7783792117560408132
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7442270590279185670}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 483b1e043b78cf84cb8e1825701f0996, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
kitchenObjectSo: {fileID: 11400000, guid: a47eee6552fccd54c9050a54cb34974b, type: 2}
|
||||||
|
--- !u!1001 &2513946609541353228
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransformParent: {fileID: 4552451234056415784}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 3812876574508226176, guid: c0c9afd619b40914a8f625c0535e2284,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3812876574508226176, guid: c0c9afd619b40914a8f625c0535e2284,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3812876574508226176, guid: c0c9afd619b40914a8f625c0535e2284,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3812876574508226176, guid: c0c9afd619b40914a8f625c0535e2284,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3812876574508226176, guid: c0c9afd619b40914a8f625c0535e2284,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3812876574508226176, guid: c0c9afd619b40914a8f625c0535e2284,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3812876574508226176, guid: c0c9afd619b40914a8f625c0535e2284,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3812876574508226176, guid: c0c9afd619b40914a8f625c0535e2284,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3812876574508226176, guid: c0c9afd619b40914a8f625c0535e2284,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3812876574508226176, guid: c0c9afd619b40914a8f625c0535e2284,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3812876574508226176, guid: c0c9afd619b40914a8f625c0535e2284,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3812876574508226177, guid: c0c9afd619b40914a8f625c0535e2284,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: Plate_Visual
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_RemovedGameObjects: []
|
||||||
|
m_AddedGameObjects: []
|
||||||
|
m_AddedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: c0c9afd619b40914a8f625c0535e2284, type: 3}
|
||||||
|
--- !u!4 &1587899386476239244 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 3812876574508226176, guid: c0c9afd619b40914a8f625c0535e2284,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 2513946609541353228}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 756828685605b994db3699a236736a1f
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
%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: 91b8562817e5ffd4f934c25179d29275, type: 3}
|
||||||
|
m_Name: Plate
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
prefab: {fileID: 4552451234056415784, guid: 756828685605b994db3699a236736a1f, type: 3}
|
||||||
|
sprite: {fileID: 21300000, guid: 3928afb5321bb3d489bbd4ac581b29a2, type: 3}
|
||||||
|
objectName: Plate
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ae22a33de916036479453fdaf08141f5
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -1,18 +1,36 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Counters
|
namespace Counters {
|
||||||
{
|
public class BaseCounter : MonoBehaviour, IKitchenObjectParent {
|
||||||
public class BaseCounter : MonoBehaviour, IKitchenObjectParent
|
[SerializeField] private Transform counterTopPoint;
|
||||||
{
|
private KitchenObject kitchenObject;
|
||||||
[SerializeField] private Transform counterTopPoint;
|
|
||||||
private KitchenObject kitchenObject;
|
public Transform GetKitchenObjectHoldPoint() {
|
||||||
|
return counterTopPoint;
|
||||||
public virtual void Interact(Player player) => Debug.LogError("Something went wrong, Interaction with BaseCounter");
|
}
|
||||||
public virtual void InteractAlternate(Player player) => Debug.LogError("Something went wrong, Interaction with BaseCounter");
|
|
||||||
public Transform GetKitchenObjectHoldPoint() => counterTopPoint;
|
public void SetKitchenObject(KitchenObject kO) {
|
||||||
public void SetKitchenObject(KitchenObject kO) => kitchenObject = kO;
|
kitchenObject = kO;
|
||||||
public KitchenObject GetKitchenObject() => kitchenObject;
|
}
|
||||||
public void ClearKitchenObject() => kitchenObject = null;
|
|
||||||
public bool HasKitchenObject() => kitchenObject != null;
|
public KitchenObject GetKitchenObject() {
|
||||||
}
|
return kitchenObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ClearKitchenObject() {
|
||||||
|
kitchenObject = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool HasKitchenObject() {
|
||||||
|
return kitchenObject is not null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void Interact(Player player) {
|
||||||
|
Debug.LogError("Something went wrong, Interaction with BaseCounter");
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void InteractAlternate(Player player) {
|
||||||
|
Debug.LogError("Something went wrong, Interaction with BaseCounter");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,43 +1,33 @@
|
|||||||
using ScriptableObjects;
|
using ScriptableObjects;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Counters
|
namespace Counters {
|
||||||
{
|
public class ClearCounter : BaseCounter {
|
||||||
public class ClearCounter : BaseCounter
|
[SerializeField] private KitchenObjectSO kitchenObjectSo;
|
||||||
{
|
|
||||||
[SerializeField] private KitchenObjectSO kitchenObjectSo;
|
|
||||||
|
|
||||||
public override void Interact(Player player)
|
public override void Interact(Player player) {
|
||||||
{
|
if (!HasKitchenObject()) {
|
||||||
if (!HasKitchenObject())
|
Debug.Log("There is no KitchenObject here");
|
||||||
{
|
if (player.HasKitchenObject()) {
|
||||||
Debug.Log("There is no KitchenObject here");
|
Debug.Log("Player is putting KitchenObject to ClearCounter");
|
||||||
if (player.HasKitchenObject())
|
player.GetKitchenObject().SetKitchenObjectParent(this);
|
||||||
{
|
player.ClearKitchenObject();
|
||||||
Debug.Log("Player is putting KitchenObject to ClearCounter");
|
}
|
||||||
player.GetKitchenObject().SetKitchenObjectParent(this);
|
else {
|
||||||
player.ClearKitchenObject();
|
Debug.Log("Player not carrying anything");
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
else {
|
||||||
Debug.Log("Player not carrying anything");
|
Debug.Log("There is a KitchenObject");
|
||||||
}
|
if (player.HasKitchenObject()) {
|
||||||
}
|
Debug.Log("Player is carrying something");
|
||||||
else
|
}
|
||||||
{
|
else {
|
||||||
Debug.Log("There is a KitchenObject");
|
Debug.Log("Player is taking KitchenObject from ClearCounter");
|
||||||
if (player.HasKitchenObject())
|
GetKitchenObject().SetKitchenObjectParent(player);
|
||||||
{
|
ClearKitchenObject();
|
||||||
Debug.Log("Player is carrying something");
|
}
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
}
|
||||||
Debug.Log("Player is taking KitchenObject from ClearCounter");
|
}
|
||||||
GetKitchenObject().SetKitchenObjectParent(player);
|
|
||||||
ClearKitchenObject();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,18 +1,22 @@
|
|||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Counters
|
namespace Counters {
|
||||||
{
|
public class ContainerCounterVisual : MonoBehaviour {
|
||||||
public class ContainerCounterVisual : MonoBehaviour
|
private static readonly int openClose = Animator.StringToHash("OpenClose");
|
||||||
{
|
[SerializeField] private ContainerCounter containerCounter;
|
||||||
[SerializeField] private ContainerCounter containerCounter;
|
private Animator animator;
|
||||||
private Animator animator;
|
|
||||||
private static readonly int openClose = Animator.StringToHash("OpenClose");
|
|
||||||
|
|
||||||
private void Awake() => animator = GetComponent<Animator>();
|
private void Awake() {
|
||||||
|
animator = GetComponent<Animator>();
|
||||||
|
}
|
||||||
|
|
||||||
private void Start() => containerCounter.OnPlayerGrabbedObject += ContainerCounbter_OnPlayerGrabbedObject;
|
private void Start() {
|
||||||
|
containerCounter.OnPlayerGrabbedObject += ContainerCounter_OnPlayerGrabbedObject;
|
||||||
|
}
|
||||||
|
|
||||||
private void ContainerCounbter_OnPlayerGrabbedObject(object sender, EventArgs e) => animator.SetTrigger(openClose);
|
private void ContainerCounter_OnPlayerGrabbedObject(object sender, EventArgs e) {
|
||||||
}
|
animator.SetTrigger(openClose);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,18 +1,22 @@
|
|||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Counters
|
namespace Counters {
|
||||||
{
|
public class CuttingCounterVisual : MonoBehaviour {
|
||||||
public class CuttingCounterVisual : MonoBehaviour
|
private static readonly int cut = Animator.StringToHash("Cut");
|
||||||
{
|
[SerializeField] private CuttingCounter cuttingCounter;
|
||||||
[SerializeField] private CuttingCounter cuttingCounter;
|
private Animator animator;
|
||||||
private Animator animator;
|
|
||||||
private static readonly int cut = Animator.StringToHash("Cut");
|
|
||||||
|
|
||||||
private void Awake() => animator = GetComponent<Animator>();
|
private void Awake() {
|
||||||
|
animator = GetComponent<Animator>();
|
||||||
|
}
|
||||||
|
|
||||||
private void Start() => cuttingCounter.OnCut += CuttingCounbter_OnCut;
|
private void Start() {
|
||||||
|
cuttingCounter.OnCut += CuttingCounbter_OnCut;
|
||||||
|
}
|
||||||
|
|
||||||
private void CuttingCounbter_OnCut(object sender, EventArgs e) => animator.SetTrigger(cut);
|
private void CuttingCounbter_OnCut(object sender, EventArgs e) {
|
||||||
}
|
animator.SetTrigger(cut);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
using System;
|
||||||
|
using ScriptableObjects;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Counters {
|
||||||
|
public class PlatesCounter : BaseCounter {
|
||||||
|
[SerializeField] private float spawnPlateTimerMax = 3f;
|
||||||
|
[SerializeField] private int platesSpawnedAmountMax = 5;
|
||||||
|
[SerializeField] private KitchenObjectSO plateKitchenObjectSO;
|
||||||
|
private int platesSpawnedAmount;
|
||||||
|
private float spawnPlateTimer;
|
||||||
|
|
||||||
|
private void Update() {
|
||||||
|
spawnPlateTimer += Time.deltaTime;
|
||||||
|
if (spawnPlateTimer > spawnPlateTimerMax) {
|
||||||
|
spawnPlateTimer = 0f;
|
||||||
|
if (platesSpawnedAmount < platesSpawnedAmountMax) {
|
||||||
|
platesSpawnedAmount++;
|
||||||
|
Debug.Log($"Spawning another plate {platesSpawnedAmount}/{platesSpawnedAmountMax}");
|
||||||
|
OnPlateSpawned?.Invoke(this, EventArgs.Empty);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public event EventHandler OnPlateSpawned;
|
||||||
|
public event EventHandler OnPlateRemoved;
|
||||||
|
|
||||||
|
public override void Interact(Player player) {
|
||||||
|
if (!player.HasKitchenObject())
|
||||||
|
// Player is empty handed
|
||||||
|
if (platesSpawnedAmount > 0) {
|
||||||
|
// There is at least one plate here
|
||||||
|
platesSpawnedAmount--;
|
||||||
|
KitchenObject.SpawnKitchenObject(plateKitchenObjectSO, player);
|
||||||
|
OnPlateRemoved?.Invoke(this, EventArgs.Empty);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 087b0f0f42cbf5541a19f1be77fb325f
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Counters {
|
||||||
|
public class PlatesCounterVisual : MonoBehaviour {
|
||||||
|
[SerializeField] private PlatesCounter platesCounter;
|
||||||
|
[SerializeField] private Transform counterTopPoint;
|
||||||
|
[SerializeField] private Transform plateVisualPrefab;
|
||||||
|
|
||||||
|
private List<GameObject> plateVisualGameObjectList;
|
||||||
|
|
||||||
|
private void Awake() {
|
||||||
|
plateVisualGameObjectList = new();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Start() {
|
||||||
|
platesCounter.OnPlateSpawned += PlatesCounter_OnPlateSpawned;
|
||||||
|
platesCounter.OnPlateRemoved += PlatesCounter_OnPlateRemoved;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PlatesCounter_OnPlateRemoved(object sender, EventArgs e) {
|
||||||
|
GameObject plateGameObject = plateVisualGameObjectList[^1];
|
||||||
|
plateVisualGameObjectList.Remove(plateGameObject);
|
||||||
|
Destroy(plateGameObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PlatesCounter_OnPlateSpawned(object sender, EventArgs e) {
|
||||||
|
Transform plateVisualTransform = Instantiate(plateVisualPrefab, counterTopPoint);
|
||||||
|
const float plateOffsetY = .1f;
|
||||||
|
plateVisualTransform.localPosition = new(0, plateOffsetY * plateVisualGameObjectList.Count, 0);
|
||||||
|
plateVisualGameObjectList.Add(plateVisualTransform.gameObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a0cb3d96f99e08d4a8763ab3d9a342a9
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -1,146 +1,136 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using ScriptableObjects;
|
using ScriptableObjects;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Counters
|
namespace Counters {
|
||||||
{
|
public class StoveCounter : BaseCounter, IHasProgress {
|
||||||
public class StoveCounter : BaseCounter, IHasProgress
|
public enum State {
|
||||||
{
|
Idle,
|
||||||
public event EventHandler<IHasProgress.OnProgressChangedEventArgs> OnProgressChanged;
|
Frying,
|
||||||
public event EventHandler<OnStateChangedEventArgs> OnStateChanged;
|
Fried,
|
||||||
|
Burned
|
||||||
public class OnStateChangedEventArgs : EventArgs
|
}
|
||||||
{
|
|
||||||
public State state;
|
[SerializeField] private FryingRecipeSO[] fryingRecipeSOArray;
|
||||||
}
|
[SerializeField] private BurningRecipeSO[] burningRecipeSOArray;
|
||||||
public enum State
|
private BurningRecipeSO burningRecipeSO;
|
||||||
{
|
private float burningTimer;
|
||||||
Idle,
|
private FryingRecipeSO fryingRecipeSO;
|
||||||
Frying,
|
private float fryingTimer;
|
||||||
Fried,
|
|
||||||
Burned,
|
private State state;
|
||||||
}
|
|
||||||
|
private void Start() {
|
||||||
[SerializeField] private FryingRecipeSO[] fryingRecipeSOArray;
|
SetState(State.Idle);
|
||||||
[SerializeField] private BurningRecipeSO[] burningRecipeSOArray;
|
}
|
||||||
|
|
||||||
private State state;
|
private void Update() {
|
||||||
private float fryingTimer;
|
if (HasKitchenObject())
|
||||||
private float burningTimer;
|
switch (state) {
|
||||||
private FryingRecipeSO fryingRecipeSO;
|
case State.Idle:
|
||||||
private BurningRecipeSO burningRecipeSO;
|
break;
|
||||||
|
case State.Frying:
|
||||||
private void Start() => SetState(State.Idle);
|
fryingTimer += Time.deltaTime;
|
||||||
|
SetProgress(fryingTimer / fryingRecipeSO.fryingTimerMax);
|
||||||
private void Update()
|
if (fryingTimer > fryingRecipeSO.fryingTimerMax) {
|
||||||
{
|
GetKitchenObject().DestroySelf();
|
||||||
if (HasKitchenObject())
|
KitchenObject.SpawnKitchenObject(fryingRecipeSO.output, this);
|
||||||
{
|
Debug.Log("Object fried");
|
||||||
switch (state)
|
SetState(State.Fried);
|
||||||
{
|
burningTimer = 0f;
|
||||||
case State.Idle:
|
burningRecipeSO = GetBurningRecipeSOWithInput(GetKitchenObject().GetKitchenObjectSO());
|
||||||
break;
|
}
|
||||||
case State.Frying:
|
|
||||||
fryingTimer += Time.deltaTime;
|
break;
|
||||||
SetProgress(fryingTimer/fryingRecipeSO.fryingTimerMax);
|
case State.Fried:
|
||||||
if (fryingTimer > fryingRecipeSO.fryingTimerMax)
|
burningTimer += Time.deltaTime;
|
||||||
{
|
SetProgress(burningTimer / burningRecipeSO.burningTimerMax);
|
||||||
GetKitchenObject().DestroySelf();
|
if (burningTimer > burningRecipeSO.burningTimerMax) {
|
||||||
KitchenObject.SpawnKitchenObject(fryingRecipeSO.output, this);
|
GetKitchenObject().DestroySelf();
|
||||||
Debug.Log("Object fried");
|
KitchenObject.SpawnKitchenObject(burningRecipeSO.output, this);
|
||||||
SetState(State.Fried);
|
Debug.Log("Object burned");
|
||||||
burningTimer = 0f;
|
SetState(State.Burned);
|
||||||
burningRecipeSO = GetBurningRecipeSOWithInput(GetKitchenObject().GetKitchenObjectSO());
|
SetProgress(0f);
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case State.Fried:
|
break;
|
||||||
burningTimer += Time.deltaTime;
|
case State.Burned:
|
||||||
SetProgress(burningTimer / burningRecipeSO.burningTimerMax);
|
break;
|
||||||
if (burningTimer > burningRecipeSO.burningTimerMax)
|
}
|
||||||
{
|
}
|
||||||
GetKitchenObject().DestroySelf();
|
|
||||||
KitchenObject.SpawnKitchenObject(burningRecipeSO.output, this);
|
public event EventHandler<IHasProgress.OnProgressChangedEventArgs> OnProgressChanged;
|
||||||
Debug.Log("Object burned");
|
public event EventHandler<OnStateChangedEventArgs> OnStateChanged;
|
||||||
SetState(State.Burned);
|
|
||||||
SetProgress(0f);
|
private void SetState(State newState) {
|
||||||
}
|
state = newState;
|
||||||
break;
|
OnStateChanged?.Invoke(this, new() { State = newState });
|
||||||
case State.Burned:
|
}
|
||||||
break;
|
|
||||||
}
|
private void SetProgress(float progress) {
|
||||||
}
|
OnProgressChanged?.Invoke(this, new() { ProgressNormalized = progress });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetState(State newState)
|
|
||||||
{
|
public override void Interact(Player player) {
|
||||||
state = newState;
|
if (!HasKitchenObject()) {
|
||||||
OnStateChanged?.Invoke(this, new() { state = newState });
|
Debug.Log("There is no KitchenObject here");
|
||||||
}
|
if (player.HasKitchenObject()) {
|
||||||
|
if (HasRecipeWithInput(player.GetKitchenObject().GetKitchenObjectSO())) {
|
||||||
private void SetProgress(float progress) =>
|
Debug.Log("Player is putting KitchenObject to StoveCounter");
|
||||||
OnProgressChanged?.Invoke(this, new() { ProgressNormalized = progress });
|
player.GetKitchenObject().SetKitchenObjectParent(this);
|
||||||
|
player.ClearKitchenObject();
|
||||||
|
fryingRecipeSO = GetFryingRecipeSOWithInput(GetKitchenObject().GetKitchenObjectSO());
|
||||||
public override void Interact(Player player)
|
SetState(State.Frying);
|
||||||
{
|
fryingTimer = 0f;
|
||||||
if (!HasKitchenObject())
|
}
|
||||||
{
|
else {
|
||||||
Debug.Log("There is no KitchenObject here");
|
Debug.Log("KitchenObject is not fryable!");
|
||||||
if (player.HasKitchenObject())
|
}
|
||||||
{
|
}
|
||||||
if (HasRecipeWithInput(player.GetKitchenObject().GetKitchenObjectSO()))
|
else {
|
||||||
{
|
Debug.Log("Player not carrying anything!");
|
||||||
Debug.Log("Player is putting KitchenObject to StoveCounter");
|
}
|
||||||
player.GetKitchenObject().SetKitchenObjectParent(this);
|
}
|
||||||
player.ClearKitchenObject();
|
else {
|
||||||
fryingRecipeSO = GetFryingRecipeSOWithInput(GetKitchenObject().GetKitchenObjectSO());
|
Debug.Log("There is a KitchenObject");
|
||||||
SetState(State.Frying);
|
if (player.HasKitchenObject()) {
|
||||||
fryingTimer = 0f;
|
Debug.Log("Player is carrying something!");
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
Debug.Log("Player is taking KitchenObject from ClearCounter");
|
||||||
Debug.Log("KitchenObject is not fryable!");
|
GetKitchenObject().SetKitchenObjectParent(player);
|
||||||
}
|
ClearKitchenObject();
|
||||||
}
|
SetState(State.Idle);
|
||||||
else
|
SetProgress(0f);
|
||||||
{
|
}
|
||||||
Debug.Log("Player not carrying anything!");
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
public override void InteractAlternate(Player player) {
|
||||||
{
|
Debug.Log("Nothing alternate to do here!");
|
||||||
Debug.Log("There is a KitchenObject");
|
}
|
||||||
if (player.HasKitchenObject())
|
|
||||||
{
|
private bool HasRecipeWithInput(KitchenObjectSO inputKitchenObjectSO) {
|
||||||
Debug.Log("Player is carrying something!");
|
return GetFryingRecipeSOWithInput(inputKitchenObjectSO);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
private KitchenObjectSO GetOutputForInput(KitchenObjectSO inputKitchenObjectSO) {
|
||||||
Debug.Log("Player is taking KitchenObject from ClearCounter");
|
FryingRecipeSO fRSO = GetFryingRecipeSOWithInput(inputKitchenObjectSO);
|
||||||
GetKitchenObject().SetKitchenObjectParent(player);
|
return fRSO ? fRSO.output : null;
|
||||||
ClearKitchenObject();
|
}
|
||||||
SetState(State.Idle);
|
|
||||||
SetProgress(0f);
|
private FryingRecipeSO GetFryingRecipeSOWithInput(KitchenObjectSO inputKitchenObjectSO) {
|
||||||
}
|
return fryingRecipeSOArray.FirstOrDefault(fRSO => fRSO.input == inputKitchenObjectSO);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
private BurningRecipeSO GetBurningRecipeSOWithInput(KitchenObjectSO inputKitchenObjectSO) {
|
||||||
public override void InteractAlternate(Player player) => Debug.Log("Nothing alternate to do here!");
|
return burningRecipeSOArray.FirstOrDefault(fRSO => fRSO.input == inputKitchenObjectSO);
|
||||||
|
}
|
||||||
private bool HasRecipeWithInput(KitchenObjectSO inputKitchenObjectSO) => GetFryingRecipeSOWithInput(inputKitchenObjectSO);
|
|
||||||
|
public class OnStateChangedEventArgs : EventArgs {
|
||||||
private KitchenObjectSO GetOutputForInput(KitchenObjectSO inputKitchenObjectSO)
|
public State State;
|
||||||
{
|
}
|
||||||
FryingRecipeSO fryingRecipeSO = GetFryingRecipeSOWithInput(inputKitchenObjectSO);
|
}
|
||||||
return fryingRecipeSO ? fryingRecipeSO.output : null;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private FryingRecipeSO GetFryingRecipeSOWithInput(KitchenObjectSO inputKitchenObjectSO) =>
|
|
||||||
fryingRecipeSOArray.FirstOrDefault(fryingRecipeSO => fryingRecipeSO.input == inputKitchenObjectSO);
|
|
||||||
|
|
||||||
private BurningRecipeSO GetBurningRecipeSOWithInput(KitchenObjectSO inputKitchenObjectSO) =>
|
|
||||||
burningRecipeSOArray.FirstOrDefault(burningRecipeSO => burningRecipeSO.input == inputKitchenObjectSO);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,24 +1,19 @@
|
|||||||
using System;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Counters
|
namespace Counters {
|
||||||
{
|
public class StoveCounterVisual : MonoBehaviour {
|
||||||
public class StoveCounterVisual : MonoBehaviour
|
[SerializeField] private StoveCounter stoveCounter;
|
||||||
{
|
[SerializeField] private GameObject stoveGameObject;
|
||||||
[SerializeField] private StoveCounter stoveCounter;
|
[SerializeField] private GameObject particlesGameObject;
|
||||||
[SerializeField] private GameObject stoveGameObject;
|
|
||||||
[SerializeField] private GameObject particlesGameObject;
|
|
||||||
|
|
||||||
private void Start()
|
private void Start() {
|
||||||
{
|
stoveCounter.OnStateChanged += StoveCounter_OnStateChanged;
|
||||||
stoveCounter.OnStateChanged += StoveCounter_OnStateChanged;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void StoveCounter_OnStateChanged(object sender, StoveCounter.OnStateChangedEventArgs e)
|
private void StoveCounter_OnStateChanged(object sender, StoveCounter.OnStateChangedEventArgs e) {
|
||||||
{
|
bool showVisual = e.State is StoveCounter.State.Frying or StoveCounter.State.Fried;
|
||||||
bool showVisual = e.state is StoveCounter.State.Frying or StoveCounter.State.Fried;
|
stoveGameObject.SetActive(showVisual);
|
||||||
stoveGameObject.SetActive(showVisual);
|
particlesGameObject.SetActive(showVisual);
|
||||||
particlesGameObject.SetActive(showVisual);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@ -1,25 +1,19 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Counters
|
namespace Counters {
|
||||||
{
|
public class TrashCounter : BaseCounter {
|
||||||
public class TrashCounter : BaseCounter
|
public override void Interact(Player player) {
|
||||||
{
|
if (player.HasKitchenObject()) {
|
||||||
public override void Interact(Player player)
|
Debug.Log("KitchenObject from player will be destroyed.");
|
||||||
{
|
player.GetKitchenObject().DestroySelf();
|
||||||
if (player.HasKitchenObject())
|
}
|
||||||
{
|
else {
|
||||||
Debug.Log("KitchenObject from player will be destroyed.");
|
Debug.Log("Player does not carry anything destroyable!");
|
||||||
player.GetKitchenObject().DestroySelf();
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("Player does not carry anything destroyable!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void InteractAlternate(Player player)
|
public override void InteractAlternate(Player player) {
|
||||||
{
|
Debug.Log("Cannot do anything alternativly here!");
|
||||||
Debug.Log("Cannot do anything alternativly here!");
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@ -1,10 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
public interface IHasProgress
|
public interface IHasProgress {
|
||||||
{
|
public event EventHandler<OnProgressChangedEventArgs> OnProgressChanged;
|
||||||
public event EventHandler<OnProgressChangedEventArgs> OnProgressChanged;
|
|
||||||
public class OnProgressChangedEventArgs : EventArgs
|
public class OnProgressChangedEventArgs : EventArgs {
|
||||||
{
|
public float ProgressNormalized;
|
||||||
public float ProgressNormalized;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@ -1,10 +1,9 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public interface IKitchenObjectParent
|
public interface IKitchenObjectParent {
|
||||||
{
|
public Transform GetKitchenObjectHoldPoint();
|
||||||
public Transform GetKitchenObjectHoldPoint();
|
public void SetKitchenObject(KitchenObject kitchenObject);
|
||||||
public void SetKitchenObject(KitchenObject kitchenObject);
|
public KitchenObject GetKitchenObject();
|
||||||
public KitchenObject GetKitchenObject();
|
public void ClearKitchenObject();
|
||||||
public void ClearKitchenObject();
|
public bool HasKitchenObject();
|
||||||
public bool HasKitchenObject();
|
}
|
||||||
}
|
|
||||||
@ -1,41 +1,40 @@
|
|||||||
using ScriptableObjects;
|
using ScriptableObjects;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class KitchenObject : MonoBehaviour
|
public class KitchenObject : MonoBehaviour {
|
||||||
{
|
[SerializeField] private KitchenObjectSO kitchenObjectSo;
|
||||||
[SerializeField] private KitchenObjectSO kitchenObjectSo;
|
private IKitchenObjectParent kitchenObjectParent;
|
||||||
private IKitchenObjectParent kitchenObjectParent;
|
|
||||||
|
public KitchenObjectSO GetKitchenObjectSO() {
|
||||||
public KitchenObjectSO GetKitchenObjectSO() => kitchenObjectSo;
|
return kitchenObjectSo;
|
||||||
public IKitchenObjectParent GetKitchenObjectParent() => kitchenObjectParent;
|
}
|
||||||
public void SetKitchenObjectParent(IKitchenObjectParent kOP)
|
|
||||||
{
|
public IKitchenObjectParent GetKitchenObjectParent() {
|
||||||
kOP.ClearKitchenObject();
|
return kitchenObjectParent;
|
||||||
|
}
|
||||||
kitchenObjectParent = kOP;
|
|
||||||
|
public void SetKitchenObjectParent(IKitchenObjectParent kOP) {
|
||||||
if (kOP.HasKitchenObject())
|
kOP.ClearKitchenObject();
|
||||||
{
|
|
||||||
Debug.LogError("IKitchenObjectParent already has a KitchenObject");
|
kitchenObjectParent = kOP;
|
||||||
}
|
|
||||||
|
if (kOP.HasKitchenObject()) Debug.LogError("IKitchenObjectParent already has a KitchenObject");
|
||||||
kOP.SetKitchenObject(this);
|
|
||||||
|
kOP.SetKitchenObject(this);
|
||||||
transform.parent = kOP.GetKitchenObjectHoldPoint();
|
|
||||||
transform.localPosition = Vector3.zero;
|
transform.parent = kOP.GetKitchenObjectHoldPoint();
|
||||||
}
|
transform.localPosition = Vector3.zero;
|
||||||
|
}
|
||||||
public void DestroySelf()
|
|
||||||
{
|
public void DestroySelf() {
|
||||||
kitchenObjectParent.ClearKitchenObject();
|
kitchenObjectParent.ClearKitchenObject();
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static KitchenObject SpawnKitchenObject(KitchenObjectSO kitchenObjectSO, IKitchenObjectParent kitchenObjectParent)
|
public static KitchenObject SpawnKitchenObject(KitchenObjectSO kitchenObjectSO, IKitchenObjectParent kitchenObjectParent) {
|
||||||
{
|
Transform kitchenObjectTransform = Instantiate(kitchenObjectSO.prefab);
|
||||||
Transform kitchenObjectTransform = Instantiate(kitchenObjectSO.prefab);
|
KitchenObject kitchenObject = kitchenObjectTransform.GetComponent<KitchenObject>();
|
||||||
KitchenObject kitchenObject = kitchenObjectTransform.GetComponent<KitchenObject>();
|
kitchenObject.SetKitchenObjectParent(kitchenObjectParent);
|
||||||
kitchenObject.SetKitchenObjectParent(kitchenObjectParent);
|
return kitchenObject;
|
||||||
return kitchenObject;
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -1,35 +1,30 @@
|
|||||||
using System;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.InputSystem.Editor;
|
|
||||||
|
|
||||||
public class LookAtCamera : MonoBehaviour
|
public class LookAtCamera : MonoBehaviour {
|
||||||
{
|
[SerializeField] private Mode mode;
|
||||||
private enum Mode
|
|
||||||
{
|
|
||||||
LookAt,
|
|
||||||
LookAtInverted,
|
|
||||||
CameraForward,
|
|
||||||
CameraForwardInverted,
|
|
||||||
}
|
|
||||||
|
|
||||||
[SerializeField] private Mode mode;
|
private void LateUpdate() {
|
||||||
private void LateUpdate()
|
switch (mode) {
|
||||||
{
|
case Mode.LookAt:
|
||||||
switch (mode)
|
transform.LookAt(Camera.main.transform);
|
||||||
{
|
break;
|
||||||
case Mode.LookAt:
|
case Mode.LookAtInverted:
|
||||||
transform.LookAt(Camera.main.transform);
|
Vector3 dirFromCamera = transform.position - Camera.main.transform.position;
|
||||||
break;
|
transform.LookAt(transform.position + dirFromCamera);
|
||||||
case Mode.LookAtInverted:
|
break;
|
||||||
Vector3 dirFromCamera = transform.position - Camera.main.transform.position;
|
case Mode.CameraForward:
|
||||||
transform.LookAt(transform.position + dirFromCamera);
|
transform.forward = Camera.main.transform.forward;
|
||||||
break;
|
break;
|
||||||
case Mode.CameraForward:
|
case Mode.CameraForwardInverted:
|
||||||
transform.forward = Camera.main.transform.forward;
|
transform.forward = -Camera.main.transform.forward;
|
||||||
break;
|
break;
|
||||||
case Mode.CameraForwardInverted:
|
}
|
||||||
transform.forward = -Camera.main.transform.forward;
|
}
|
||||||
break;
|
|
||||||
}
|
private enum Mode {
|
||||||
}
|
LookAt,
|
||||||
}
|
LookAtInverted,
|
||||||
|
CameraForward,
|
||||||
|
CameraForwardInverted
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,19 +1,16 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class PlayerAnimator : MonoBehaviour
|
public class PlayerAnimator : MonoBehaviour {
|
||||||
{
|
private static readonly int isWalking = Animator.StringToHash("IsWalking");
|
||||||
[SerializeField] private Player player;
|
[SerializeField] private Player player;
|
||||||
|
|
||||||
private Animator animator;
|
|
||||||
private static readonly int isWalking = Animator.StringToHash("IsWalking");
|
|
||||||
|
|
||||||
private void Awake()
|
private Animator animator;
|
||||||
{
|
|
||||||
animator = GetComponent<Animator>();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Update()
|
private void Awake() {
|
||||||
{
|
animator = GetComponent<Animator>();
|
||||||
animator.SetBool(isWalking, player.IsWalking());
|
}
|
||||||
}
|
|
||||||
}
|
private void Update() {
|
||||||
|
animator.SetBool(isWalking, player.IsWalking());
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,39 +1,35 @@
|
|||||||
using System;
|
|
||||||
using Counters;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public class ProgressBarUI : MonoBehaviour
|
public class ProgressBarUI : MonoBehaviour {
|
||||||
{
|
[SerializeField] private GameObject hasProgressGameObject;
|
||||||
[SerializeField] private GameObject hasProgressGameObject;
|
[SerializeField] private Image barImage;
|
||||||
[SerializeField] private Image barImage ;
|
|
||||||
|
|
||||||
private IHasProgress hasProgress;
|
|
||||||
|
|
||||||
private void Start()
|
private IHasProgress hasProgress;
|
||||||
{
|
|
||||||
hasProgress = hasProgressGameObject.GetComponent<IHasProgress>();
|
|
||||||
if (hasProgress == null)
|
|
||||||
{
|
|
||||||
Debug.LogError($"Game Object {hasProgressGameObject} does not have a component that implements IHasProgress!");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
hasProgress.OnProgressChanged += HasProgress_OnProgressChanged;
|
|
||||||
}
|
|
||||||
barImage.fillAmount = 0f;
|
|
||||||
Hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void HasProgress_OnProgressChanged(object sender, IHasProgress.OnProgressChangedEventArgs e)
|
private void Start() {
|
||||||
{
|
hasProgress = hasProgressGameObject.GetComponent<IHasProgress>();
|
||||||
barImage.fillAmount = e.ProgressNormalized;
|
if (hasProgress == null)
|
||||||
if (e.ProgressNormalized is 0f or 1f)
|
Debug.LogError($"Game Object {hasProgressGameObject} does not have a component that implements IHasProgress!");
|
||||||
Hide();
|
else
|
||||||
else
|
hasProgress.OnProgressChanged += HasProgress_OnProgressChanged;
|
||||||
Show();
|
barImage.fillAmount = 0f;
|
||||||
}
|
Hide();
|
||||||
|
}
|
||||||
|
|
||||||
private void Show() => gameObject.SetActive(true);
|
private void HasProgress_OnProgressChanged(object sender, IHasProgress.OnProgressChangedEventArgs e) {
|
||||||
private void Hide() => gameObject.SetActive(false);
|
barImage.fillAmount = e.ProgressNormalized;
|
||||||
}
|
if (e.ProgressNormalized is 0f or 1f)
|
||||||
|
Hide();
|
||||||
|
else
|
||||||
|
Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Show() {
|
||||||
|
gameObject.SetActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Hide() {
|
||||||
|
gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,12 +1,10 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace ScriptableObjects
|
namespace ScriptableObjects {
|
||||||
{
|
[CreateAssetMenu]
|
||||||
[CreateAssetMenu()]
|
public class BurningRecipeSO : ScriptableObject {
|
||||||
public class BurningRecipeSO : ScriptableObject
|
public KitchenObjectSO input;
|
||||||
{
|
public KitchenObjectSO output;
|
||||||
public KitchenObjectSO input;
|
public float burningTimerMax;
|
||||||
public KitchenObjectSO output;
|
}
|
||||||
public float burningTimerMax;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,12 +1,10 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace ScriptableObjects
|
namespace ScriptableObjects {
|
||||||
{
|
[CreateAssetMenu]
|
||||||
[CreateAssetMenu()]
|
public class CuttingRecipeSO : ScriptableObject {
|
||||||
public class CuttingRecipeSO : ScriptableObject
|
public KitchenObjectSO input;
|
||||||
{
|
public KitchenObjectSO output;
|
||||||
public KitchenObjectSO input;
|
public int cuttingProgressMax;
|
||||||
public KitchenObjectSO output;
|
}
|
||||||
public int cuttingProgressMax;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,12 +1,10 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace ScriptableObjects
|
namespace ScriptableObjects {
|
||||||
{
|
[CreateAssetMenu]
|
||||||
[CreateAssetMenu()]
|
public class FryingRecipeSO : ScriptableObject {
|
||||||
public class FryingRecipeSO : ScriptableObject
|
public KitchenObjectSO input;
|
||||||
{
|
public KitchenObjectSO output;
|
||||||
public KitchenObjectSO input;
|
public float fryingTimerMax;
|
||||||
public KitchenObjectSO output;
|
}
|
||||||
public float fryingTimerMax;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,12 +1,10 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace ScriptableObjects
|
namespace ScriptableObjects {
|
||||||
{
|
[CreateAssetMenu]
|
||||||
[CreateAssetMenu()]
|
public class KitchenObjectSO : ScriptableObject {
|
||||||
public class KitchenObjectSO : ScriptableObject
|
public Transform prefab;
|
||||||
{
|
public Sprite sprite;
|
||||||
public Transform prefab;
|
public string objectName;
|
||||||
public Sprite sprite;
|
}
|
||||||
public string objectName;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,37 +1,28 @@
|
|||||||
using Counters;
|
using Counters;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class SelectedCounterVisual : MonoBehaviour
|
public class SelectedCounterVisual : MonoBehaviour {
|
||||||
{
|
[SerializeField] private BaseCounter baseCounter;
|
||||||
[SerializeField] private BaseCounter baseCounter;
|
[SerializeField] private GameObject[] visualGameObjectArray;
|
||||||
[SerializeField] private GameObject[] visualGameObjectArray;
|
|
||||||
|
|
||||||
private void Start()
|
|
||||||
{
|
|
||||||
Player.Instance.OnSelectedCounterChanged += Player_OnSelectedCounterChanged;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Player_OnSelectedCounterChanged(object sender, Player.OnSelectedCounterChangedEventArgs e)
|
private void Start() {
|
||||||
{
|
Player.Instance.OnSelectedCounterChanged += Player_OnSelectedCounterChanged;
|
||||||
if (e.SelectedCounter == baseCounter)
|
}
|
||||||
{
|
|
||||||
Show();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Show()
|
private void Player_OnSelectedCounterChanged(object sender, Player.OnSelectedCounterChangedEventArgs e) {
|
||||||
{
|
if (e.SelectedCounter == baseCounter)
|
||||||
foreach (GameObject visualGameObject in visualGameObjectArray)
|
Show();
|
||||||
visualGameObject.SetActive(true);
|
else
|
||||||
}
|
Hide();
|
||||||
|
}
|
||||||
|
|
||||||
private void Hide()
|
private void Show() {
|
||||||
{
|
foreach (GameObject visualGameObject in visualGameObjectArray)
|
||||||
foreach (GameObject visualGameObject in visualGameObjectArray)
|
visualGameObject.SetActive(true);
|
||||||
visualGameObject.SetActive(false);
|
}
|
||||||
}
|
|
||||||
}
|
private void Hide() {
|
||||||
|
foreach (GameObject visualGameObject in visualGameObjectArray)
|
||||||
|
visualGameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,2 +1,4 @@
|
|||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=OP/@EntryIndexedValue">OP</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RSO/@EntryIndexedValue">RSO</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SO/@EntryIndexedValue">SO</s:String></wpf:ResourceDictionary>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SO/@EntryIndexedValue">SO</s:String></wpf:ResourceDictionary>
|
||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,10 @@
|
|||||||
{ "pid": 35942, "tid": -1, "ph": "M", "name": "process_name", "args": { "name": "netcorerun.dll" } },
|
{ "pid": 35942, "tid": -1, "ph": "M", "name": "process_name", "args": { "name": "netcorerun.dll" } },
|
||||||
{ "pid": 35942, "tid": -1, "ph": "M", "name": "process_sort_index", "args": { "sort_index": "-1" } },
|
{ "pid": 35942, "tid": -1, "ph": "M", "name": "process_sort_index", "args": { "sort_index": "-1" } },
|
||||||
{ "pid": 35942, "tid": 1, "ph": "M", "name": "thread_name", "args": { "name": "" } },
|
{ "pid": 35942, "tid": 1, "ph": "M", "name": "thread_name", "args": { "name": "" } },
|
||||||
{ "pid": 35942, "tid": 1, "ts": 1675413764676499, "dur": 443967, "ph": "X", "name": "BuildProgram", "args": {} },
|
{ "pid": 35942, "tid": 1, "ts": 1675418628799125, "dur": 545731, "ph": "X", "name": "BuildProgram", "args": {} },
|
||||||
{ "pid": 35942, "tid": 1, "ts": 1675413764678282, "dur": 75553, "ph": "X", "name": "BuildProgramContextConstructor", "args": {} },
|
{ "pid": 35942, "tid": 1, "ts": 1675418628800416, "dur": 72421, "ph": "X", "name": "BuildProgramContextConstructor", "args": {} },
|
||||||
{ "pid": 35942, "tid": 1, "ts": 1675413765038873, "dur": 5634, "ph": "X", "name": "OutputData.Write", "args": {} },
|
{ "pid": 35942, "tid": 1, "ts": 1675418629263678, "dur": 5485, "ph": "X", "name": "OutputData.Write", "args": {} },
|
||||||
{ "pid": 35942, "tid": 1, "ts": 1675413765044512, "dur": 75936, "ph": "X", "name": "Backend.Write", "args": {} },
|
{ "pid": 35942, "tid": 1, "ts": 1675418629269167, "dur": 75675, "ph": "X", "name": "Backend.Write", "args": {} },
|
||||||
{ "pid": 35942, "tid": 1, "ts": 1675413765046953, "dur": 45932, "ph": "X", "name": "JsonToString", "args": {} },
|
{ "pid": 35942, "tid": 1, "ts": 1675418629271131, "dur": 54488, "ph": "X", "name": "JsonToString", "args": {} },
|
||||||
{ "pid": 35942, "tid": 1, "ts": 1675413765133307, "dur": 1439, "ph": "X", "name": "", "args": {} },
|
{ "pid": 35942, "tid": 1, "ts": 1675418629354074, "dur": 1807, "ph": "X", "name": "", "args": {} },
|
||||||
{ "pid": 35942, "tid": 1, "ts": 1675413765132742, "dur": 2262, "ph": "X", "name": "Write chrome-trace events", "args": {} },
|
{ "pid": 35942, "tid": 1, "ts": 1675418629353458, "dur": 2941, "ph": "X", "name": "Write chrome-trace events", "args": {} },
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,167 +1,167 @@
|
|||||||
{
|
{
|
||||||
"templatePinStates": [],
|
"templatePinStates": [],
|
||||||
"dependencyTypeInfos": [
|
"dependencyTypeInfos": [
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.AnimationClip",
|
"type": "UnityEngine.AnimationClip",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEditor.Animations.AnimatorController",
|
"type": "UnityEditor.Animations.AnimatorController",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.AnimatorOverrideController",
|
"type": "UnityEngine.AnimatorOverrideController",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEditor.Audio.AudioMixerController",
|
"type": "UnityEditor.Audio.AudioMixerController",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.ComputeShader",
|
"type": "UnityEngine.ComputeShader",
|
||||||
"ignore": true,
|
"ignore": true,
|
||||||
"defaultInstantiationMode": 1,
|
"defaultInstantiationMode": 1,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.Cubemap",
|
"type": "UnityEngine.Cubemap",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.GameObject",
|
"type": "UnityEngine.GameObject",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEditor.LightingDataAsset",
|
"type": "UnityEditor.LightingDataAsset",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": false
|
"supportsModification": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.LightingSettings",
|
"type": "UnityEngine.LightingSettings",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.Material",
|
"type": "UnityEngine.Material",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEditor.MonoScript",
|
"type": "UnityEditor.MonoScript",
|
||||||
"ignore": true,
|
"ignore": true,
|
||||||
"defaultInstantiationMode": 1,
|
"defaultInstantiationMode": 1,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.PhysicMaterial",
|
"type": "UnityEngine.PhysicMaterial",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.PhysicsMaterial2D",
|
"type": "UnityEngine.PhysicsMaterial2D",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile",
|
"type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.Rendering.PostProcessing.PostProcessResources",
|
"type": "UnityEngine.Rendering.PostProcessing.PostProcessResources",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.Rendering.VolumeProfile",
|
"type": "UnityEngine.Rendering.VolumeProfile",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEditor.SceneAsset",
|
"type": "UnityEditor.SceneAsset",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": false
|
"supportsModification": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.Shader",
|
"type": "UnityEngine.Shader",
|
||||||
"ignore": true,
|
"ignore": true,
|
||||||
"defaultInstantiationMode": 1,
|
"defaultInstantiationMode": 1,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.ShaderVariantCollection",
|
"type": "UnityEngine.ShaderVariantCollection",
|
||||||
"ignore": true,
|
"ignore": true,
|
||||||
"defaultInstantiationMode": 1,
|
"defaultInstantiationMode": 1,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.Texture",
|
"type": "UnityEngine.Texture",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.Texture2D",
|
"type": "UnityEngine.Texture2D",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "UnityEngine.Timeline.TimelineAsset",
|
"type": "UnityEngine.Timeline.TimelineAsset",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 0,
|
"defaultInstantiationMode": 0,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"defaultDependencyTypeInfo": {
|
"defaultDependencyTypeInfo": {
|
||||||
"userAdded": false,
|
"userAdded": false,
|
||||||
"type": "<default_scene_template_dependencies>",
|
"type": "<default_scene_template_dependencies>",
|
||||||
"ignore": false,
|
"ignore": false,
|
||||||
"defaultInstantiationMode": 1,
|
"defaultInstantiationMode": 1,
|
||||||
"supportsModification": true
|
"supportsModification": true
|
||||||
},
|
},
|
||||||
"newSceneOverride": 0
|
"newSceneOverride": 0
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue