diff --git a/Assets/BlenderModels/desk.blend b/Assets/BlenderModels/desk.blend new file mode 100644 index 00000000..4da6b926 Binary files /dev/null and b/Assets/BlenderModels/desk.blend differ diff --git a/Assets/BlenderModels/desk.blend.meta b/Assets/BlenderModels/desk.blend.meta new file mode 100644 index 00000000..518c03b0 --- /dev/null +++ b/Assets/BlenderModels/desk.blend.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: 2709e321a53d2184e8016e035369997c +ModelImporter: + serializedVersion: 22200 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 2 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + removeConstantScaleCurves: 0 + motionNodeName: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importPhysicalCameras: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + nodeNameCollisionStrategy: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + optimizeBones: 1 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + strictVertexDataChecks: 0 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + importBlendShapeDeformPercent: 1 + remapMaterialsIfMaterialImportModeIsNone: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BlenderModels/desk.blend1 b/Assets/BlenderModels/desk.blend1 new file mode 100644 index 00000000..0771a07e Binary files /dev/null and b/Assets/BlenderModels/desk.blend1 differ diff --git a/Assets/BlenderModels/desk.blend1.meta b/Assets/BlenderModels/desk.blend1.meta new file mode 100644 index 00000000..89ddbc05 --- /dev/null +++ b/Assets/BlenderModels/desk.blend1.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4083e180ef0192d4eb3296c479f2c0de +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Brick Project Studio/_BPS Basic Assets/Common/Materials/Legacy/Gold.mat b/Assets/Brick Project Studio/_BPS Basic Assets/Common/Materials/Legacy/Gold.mat index d56b161b..f051dd05 100644 --- a/Assets/Brick Project Studio/_BPS Basic Assets/Common/Materials/Legacy/Gold.mat +++ b/Assets/Brick Project Studio/_BPS Basic Assets/Common/Materials/Legacy/Gold.mat @@ -19,7 +19,8 @@ Material: m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -82,6 +83,7 @@ Material: m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: + - _AddPrecomputedVelocity: 0 - _AlphaClip: 0 - _AlphaToMask: 0 - _Blend: 0 @@ -120,6 +122,7 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &5662825381254376294 MonoBehaviour: m_ObjectHideFlags: 11 diff --git a/Assets/Materials/LowPolyCity/Material.mat b/Assets/Materials/LowPolyCity/Material.mat index 4a4204bf..085198f8 100644 --- a/Assets/Materials/LowPolyCity/Material.mat +++ b/Assets/Materials/LowPolyCity/Material.mat @@ -96,6 +96,7 @@ Material: m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: + - _AddPrecomputedVelocity: 0 - _AlphaClip: 0 - _AlphaToMask: 0 - _Blend: 0 @@ -129,8 +130,8 @@ Material: - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _BaseColor: {r: 0.21960786, g: 0.21960786, b: 0.21960786, a: 1} + - _Color: {r: 0.21960783, g: 0.21960783, b: 0.21960783, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] diff --git a/Assets/Models/Furniture.meta b/Assets/Models/Furniture.meta new file mode 100644 index 00000000..4c9fb1d6 --- /dev/null +++ b/Assets/Models/Furniture.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 20e11845776b2c04681208efa7e8f17b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/Furniture/desk.fbx b/Assets/Models/Furniture/desk.fbx new file mode 100644 index 00000000..f96b2d9c Binary files /dev/null and b/Assets/Models/Furniture/desk.fbx differ diff --git a/Assets/Models/Furniture/desk.fbx.meta b/Assets/Models/Furniture/desk.fbx.meta new file mode 100644 index 00000000..c2b18e20 --- /dev/null +++ b/Assets/Models/Furniture/desk.fbx.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: 9bd342097a69da64daea3e6f3814ad3e +ModelImporter: + serializedVersion: 22200 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 2 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + removeConstantScaleCurves: 0 + motionNodeName: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importPhysicalCameras: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + nodeNameCollisionStrategy: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + optimizeBones: 1 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + strictVertexDataChecks: 0 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + importBlendShapeDeformPercent: 1 + remapMaterialsIfMaterialImportModeIsNone: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/Interrior/window.mat b/Assets/Models/Interrior/window.mat new file mode 100644 index 00000000..1cfe8abe --- /dev/null +++ b/Assets/Models/Interrior/window.mat @@ -0,0 +1,142 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-953634261371453 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 9 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: window + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _ALPHAPREMULTIPLY_ON + - _SURFACE_TYPE_TRANSPARENT + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 1 + m_CustomRenderQueue: 3000 + stringTagMap: + RenderType: Transparent + disabledShaderPasses: + - MOTIONVECTORS + - DepthOnly + - SHADOWCASTER + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AddPrecomputedVelocity: 0 + - _AlphaClip: 0 + - _AlphaToMask: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 0 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 10 + - _DstBlendAlpha: 10 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 1 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 3 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 1 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Surface: 1 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 0 + m_Colors: + - _BaseColor: {r: 0.9063317, g: 0.9063317, b: 0.9063317, a: 0.07352942} + - _Color: {r: 0.9063317, g: 0.9063317, b: 0.9063317, a: 0.07352942} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/Models/Interrior/window.mat.meta b/Assets/Models/Interrior/window.mat.meta new file mode 100644 index 00000000..326783e8 --- /dev/null +++ b/Assets/Models/Interrior/window.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ba205028c7ac66643ad562673c41e358 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Interior/OfficeWorkerTable.prefab b/Assets/Prefabs/Interior/OfficeWorkerTable.prefab index c3b6a1a8..bad98845 100644 --- a/Assets/Prefabs/Interior/OfficeWorkerTable.prefab +++ b/Assets/Prefabs/Interior/OfficeWorkerTable.prefab @@ -55,7 +55,6 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 7952466374899613004} - - component: {fileID: 3764780206137042927} m_Layer: 0 m_Name: Selected m_TagString: Untagged @@ -79,21 +78,6 @@ Transform: - {fileID: 8431406351439517098} m_Father: {fileID: 662032107352504808} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &3764780206137042927 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5280816860339018031} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 70ee3205d7b15b4449cdacc7a726e220, type: 3} - m_Name: - m_EditorClassIdentifier: - _selectedObject: {fileID: 5278860039823974021} - visualGameObjectArray: - - {fileID: 1167066362511717000} --- !u!1 &5437460437420272161 GameObject: m_ObjectHideFlags: 0 @@ -136,6 +120,7 @@ GameObject: - component: {fileID: 662032107352504808} - component: {fileID: 3329916335696048154} - component: {fileID: 5278860039823974021} + - component: {fileID: 113071787670326870} m_Layer: 6 m_Name: OfficeWorkerTable m_TagString: Untagged @@ -196,7 +181,21 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _interactionPoint: {fileID: 2849715539346458925} - _jobPositionsSO: {fileID: 11400000, guid: f0d3baaabf19f9a4a80e227316362d84, type: 2} + _dialogOptionsSO: {fileID: 0} + _dialogSO: {fileID: 11400000, guid: 8c330d22202c025408b0fcf250a57d15, type: 2} +--- !u!114 &113071787670326870 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8759329460999808753} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 58e5a6d4728f393419100a54758a4e62, type: 3} + m_Name: + m_EditorClassIdentifier: + color: {r: 1, g: 1, b: 1, a: 1} --- !u!1001 &3187777146008072678 PrefabInstance: m_ObjectHideFlags: 0 @@ -322,12 +321,6 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 7699f5af06713974ba61777a8a830f6e, type: 3} ---- !u!1 &1167066362511717000 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 4327680794412319598, guid: 7699f5af06713974ba61777a8a830f6e, - type: 3} - m_PrefabInstance: {fileID: 3187777146008072678} - m_PrefabAsset: {fileID: 0} --- !u!4 &8431406351439517098 stripped Transform: m_CorrespondingSourceObject: {fileID: 6430890726198682700, guid: 7699f5af06713974ba61777a8a830f6e, diff --git a/Assets/Prefabs/UI/JobSelectorUI.prefab b/Assets/Prefabs/UI/DialogUI.prefab similarity index 98% rename from Assets/Prefabs/UI/JobSelectorUI.prefab rename to Assets/Prefabs/UI/DialogUI.prefab index d38dc5d9..2ceff0cd 100644 --- a/Assets/Prefabs/UI/JobSelectorUI.prefab +++ b/Assets/Prefabs/UI/DialogUI.prefab @@ -9,9 +9,9 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 8958716429631575486} - - component: {fileID: 3776407727599883163} + - component: {fileID: 4025874161359567020} m_Layer: 5 - m_Name: JobSelectorUI + m_Name: DialogUI m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -37,7 +37,7 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &3776407727599883163 +--- !u!114 &4025874161359567020 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -55,13 +55,9 @@ MonoBehaviour: _btnOk: {fileID: 8583321522316129160} _itemsContainer: {fileID: 3731607605728727607} _tabsContainer: {fileID: 1207846913041912348} - _jobItemUItemplate: {fileID: 4899774397145829728, guid: 3fd1d54e5064a0841972b791abc6919f, + _jobItemUItemplate: {fileID: 0} + _dialogTabUI: {fileID: 5217370655548404981, guid: ea2a34492b0d3704cbec939efd66d26d, type: 3} - _jobTabUItemplate: {fileID: 5217370655548404981, guid: ea2a34492b0d3704cbec939efd66d26d, - type: 3} - _jobs: - - {fileID: 11400000, guid: 137a0a77aa02f614ead909f23a670e95, type: 2} - - {fileID: 11400000, guid: f0d3baaabf19f9a4a80e227316362d84, type: 2} --- !u!1 &2383697791284729918 GameObject: m_ObjectHideFlags: 0 @@ -170,15 +166,17 @@ MonoBehaviour: m_lineSpacingMax: 0 m_paragraphSpacing: 0 m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 + m_TextWrappingMode: 1 m_wordWrappingRatios: 0.4 m_overflowMode: 0 m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} m_enableKerning: 1 + m_ActiveFontFeatures: 6e72656b m_enableExtraPadding: 0 checkPaddingRequired: 0 m_isRichText: 1 + m_EmojiFallbackSupport: 1 m_parseCtrlCharacters: 1 m_isOrthographic: 1 m_isCullingEnabled: 0 @@ -349,15 +347,17 @@ MonoBehaviour: m_lineSpacingMax: 0 m_paragraphSpacing: 0 m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 + m_TextWrappingMode: 1 m_wordWrappingRatios: 0.4 m_overflowMode: 0 m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} m_enableKerning: 1 + m_ActiveFontFeatures: 6e72656b m_enableExtraPadding: 0 checkPaddingRequired: 0 m_isRichText: 1 + m_EmojiFallbackSupport: 1 m_parseCtrlCharacters: 1 m_isOrthographic: 1 m_isCullingEnabled: 0 @@ -838,6 +838,11 @@ PrefabInstance: propertyPath: m_fontSizeBase value: 24 objectReference: {fileID: 0} + - target: {fileID: 3806516703089782040, guid: ea47665625ccfd4408f6411caf45f910, + type: 3} + propertyPath: 'm_ActiveFontFeatures.Array.data[0]' + value: 1801810542 + objectReference: {fileID: 0} - target: {fileID: 3806516703089782041, guid: ea47665625ccfd4408f6411caf45f910, type: 3} propertyPath: m_AnchorMax.y @@ -1173,6 +1178,11 @@ PrefabInstance: propertyPath: m_fontSizeBase value: 24 objectReference: {fileID: 0} + - target: {fileID: 3806516703089782040, guid: ea47665625ccfd4408f6411caf45f910, + type: 3} + propertyPath: 'm_ActiveFontFeatures.Array.data[0]' + value: 1801810542 + objectReference: {fileID: 0} - target: {fileID: 3806516703089782041, guid: ea47665625ccfd4408f6411caf45f910, type: 3} propertyPath: m_AnchorMax.y diff --git a/Assets/Prefabs/UI/JobSelectorUI.prefab.meta b/Assets/Prefabs/UI/DialogUI.prefab.meta similarity index 100% rename from Assets/Prefabs/UI/JobSelectorUI.prefab.meta rename to Assets/Prefabs/UI/DialogUI.prefab.meta diff --git a/Assets/Scenes/City.unity b/Assets/Scenes/City.unity index 3b5f4742..b47aec22 100644 --- a/Assets/Scenes/City.unity +++ b/Assets/Scenes/City.unity @@ -1685,9 +1685,9 @@ RectTransform: m_Children: [] m_Father: {fileID: 349281313} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 250, y: -90} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 250, y: 0} m_SizeDelta: {x: 480, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &249161732 @@ -1879,7 +1879,8 @@ MonoBehaviour: m_EditorClassIdentifier: _timeSliderPrefab: {fileID: 5407876737168081677, guid: 15f8d2a34d602b04c9694f4eea8948d3, type: 3} - _jobSelectorPrefab: {fileID: 0} + _DialogUIPrefab: {fileID: 4025874161359567020, guid: 2ad5edd099127044684eeca456ed3d00, + type: 3} _blurOverlay: {fileID: 661798880} _radialMenuItemPrefab: {fileID: 5424962769672562944, guid: 543443cf1b9e73b4193a13044eda04d2, type: 3} @@ -4240,6 +4241,74 @@ Camera: m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 +--- !u!1001 &764085430 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 662032107352504808, guid: 7df4c91b7961f794da5a651e64cc8ac5, + type: 3} + propertyPath: m_LocalPosition.x + value: 144.52164 + objectReference: {fileID: 0} + - target: {fileID: 662032107352504808, guid: 7df4c91b7961f794da5a651e64cc8ac5, + type: 3} + propertyPath: m_LocalPosition.y + value: 6.3500004 + objectReference: {fileID: 0} + - target: {fileID: 662032107352504808, guid: 7df4c91b7961f794da5a651e64cc8ac5, + type: 3} + propertyPath: m_LocalPosition.z + value: 239.38367 + objectReference: {fileID: 0} + - target: {fileID: 662032107352504808, guid: 7df4c91b7961f794da5a651e64cc8ac5, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 662032107352504808, guid: 7df4c91b7961f794da5a651e64cc8ac5, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 662032107352504808, guid: 7df4c91b7961f794da5a651e64cc8ac5, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 662032107352504808, guid: 7df4c91b7961f794da5a651e64cc8ac5, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 662032107352504808, guid: 7df4c91b7961f794da5a651e64cc8ac5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 662032107352504808, guid: 7df4c91b7961f794da5a651e64cc8ac5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 662032107352504808, guid: 7df4c91b7961f794da5a651e64cc8ac5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8759329460999808753, guid: 7df4c91b7961f794da5a651e64cc8ac5, + type: 3} + propertyPath: m_Name + value: OfficeWorkerTable + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 7df4c91b7961f794da5a651e64cc8ac5, type: 3} --- !u!1 &780261547 GameObject: m_ObjectHideFlags: 0 @@ -8688,3 +8757,4 @@ SceneRoots: - {fileID: 1880854723} - {fileID: 495189437} - {fileID: 1291994925} + - {fileID: 764085430} diff --git a/Assets/Scenes/School.unity b/Assets/Scenes/School.unity index f526d2ff..5114d759 100644 --- a/Assets/Scenes/School.unity +++ b/Assets/Scenes/School.unity @@ -469,6 +469,74 @@ Transform: type: 3} m_PrefabInstance: {fileID: 130749353} m_PrefabAsset: {fileID: 0} +--- !u!1001 &202296544 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 9bd342097a69da64daea3e6f3814ad3e, + type: 3} + propertyPath: m_LocalPosition.x + value: 3.37 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bd342097a69da64daea3e6f3814ad3e, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.84 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bd342097a69da64daea3e6f3814ad3e, + type: 3} + propertyPath: m_LocalPosition.z + value: -2.38 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bd342097a69da64daea3e6f3814ad3e, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.50008726 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bd342097a69da64daea3e6f3814ad3e, + type: 3} + propertyPath: m_LocalRotation.x + value: -0.49991274 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bd342097a69da64daea3e6f3814ad3e, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.50008726 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bd342097a69da64daea3e6f3814ad3e, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.49991274 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bd342097a69da64daea3e6f3814ad3e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -89.98 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bd342097a69da64daea3e6f3814ad3e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 90 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9bd342097a69da64daea3e6f3814ad3e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 9bd342097a69da64daea3e6f3814ad3e, + type: 3} + propertyPath: m_Name + value: desk (1) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 9bd342097a69da64daea3e6f3814ad3e, type: 3} --- !u!1001 &385599245 PrefabInstance: m_ObjectHideFlags: 0 @@ -723,7 +791,7 @@ PrefabInstance: - target: {fileID: -8679921383154817045, guid: 094143b068357224fabf0fa92fee31cb, type: 3} propertyPath: m_LocalPosition.z - value: -1.620001 + value: -2.19 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 094143b068357224fabf0fa92fee31cb, type: 3} @@ -1080,6 +1148,11 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: 780942ce2a0781847a785cc2a6542524, + type: 3} + propertyPath: 'm_Materials.Array.data[2]' + value: + objectReference: {fileID: 2100000, guid: ba205028c7ac66643ad562673c41e358, type: 2} - target: {fileID: 919132149155446097, guid: 780942ce2a0781847a785cc2a6542524, type: 3} propertyPath: m_Name @@ -1233,11 +1306,27 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: 0c8bb8ae79767d54cb8f825f82322c06, + type: 3} + propertyPath: m_CastShadows + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: 0c8bb8ae79767d54cb8f825f82322c06, + type: 3} + propertyPath: 'm_Materials.Array.data[0]' + value: + objectReference: {fileID: -206713309220777044, guid: f85c42ebe35945e4986cba3418681f3e, + type: 3} - target: {fileID: 919132149155446097, guid: 0c8bb8ae79767d54cb8f825f82322c06, type: 3} propertyPath: m_Name value: FlatWall (40) objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 0c8bb8ae79767d54cb8f825f82322c06, + type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] @@ -1613,7 +1702,7 @@ Transform: m_GameObject: {fileID: 904172955} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 3.19, y: 2.599, z: -1.93} + m_LocalPosition: {x: 3.19, y: 2.592, z: -1.93} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -1908,7 +1997,6 @@ Transform: - {fileID: 754702662} - {fileID: 570611633} - {fileID: 695816893} - - {fileID: 1287806106} - {fileID: 1880886690} - {fileID: 1779294544} - {fileID: 904303565} @@ -2467,86 +2555,6 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1285327579} m_PrefabAsset: {fileID: 0} ---- !u!1001 &1287806105 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 966157588} - m_Modifications: - - target: {fileID: -8679921383154817045, guid: 0c8bb8ae79767d54cb8f825f82322c06, - type: 3} - propertyPath: m_LocalPosition.x - value: 0.46 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0c8bb8ae79767d54cb8f825f82322c06, - type: 3} - propertyPath: m_LocalPosition.y - value: 1.3310469 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0c8bb8ae79767d54cb8f825f82322c06, - type: 3} - propertyPath: m_LocalPosition.z - value: 0.059999943 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0c8bb8ae79767d54cb8f825f82322c06, - type: 3} - propertyPath: m_LocalRotation.w - value: 0.7072302 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0c8bb8ae79767d54cb8f825f82322c06, - type: 3} - propertyPath: m_LocalRotation.x - value: -0.7069834 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0c8bb8ae79767d54cb8f825f82322c06, - type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0c8bb8ae79767d54cb8f825f82322c06, - type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0c8bb8ae79767d54cb8f825f82322c06, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: -89.98 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0c8bb8ae79767d54cb8f825f82322c06, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0c8bb8ae79767d54cb8f825f82322c06, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -7511558181221131132, guid: 0c8bb8ae79767d54cb8f825f82322c06, - type: 3} - propertyPath: 'm_Materials.Array.data[0]' - value: - objectReference: {fileID: -206713309220777044, guid: 0c8bb8ae79767d54cb8f825f82322c06, - type: 3} - - target: {fileID: 919132149155446097, guid: 0c8bb8ae79767d54cb8f825f82322c06, - type: 3} - propertyPath: m_Name - value: FlatWall (41) - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 0c8bb8ae79767d54cb8f825f82322c06, type: 3} ---- !u!4 &1287806106 stripped -Transform: - m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 0c8bb8ae79767d54cb8f825f82322c06, - type: 3} - m_PrefabInstance: {fileID: 1287806105} - m_PrefabAsset: {fileID: 0} --- !u!1001 &1318414708 PrefabInstance: m_ObjectHideFlags: 0 @@ -4778,3 +4786,4 @@ SceneRoots: - {fileID: 456606824} - {fileID: 1322861160939933662} - {fileID: 2018736431} + - {fileID: 202296544} diff --git a/Assets/Scripts/InteractableObjects/OfficeTable.cs b/Assets/Scripts/InteractableObjects/OfficeTable.cs index 4a3e5310..deff901a 100644 --- a/Assets/Scripts/InteractableObjects/OfficeTable.cs +++ b/Assets/Scripts/InteractableObjects/OfficeTable.cs @@ -3,8 +3,9 @@ using UnityEngine; public class OfficeTable : BaseInteractableObject { [SerializeField] - private JobsListSO _jobPositionsSO; - + private DialogCategorySO _dialogOptionsSO; + [SerializeField] + private DialogSO _dialogSO; protected override void PrepareMenuActions() { _menuActions[RadialMenuActions.Talk].IsEnabled = true; @@ -12,7 +13,7 @@ public class OfficeTable : BaseInteractableObject protected override void InteractAction(RadialMenuActions interactAction) { - GameManager.Instance.UI.ShowJobSelectionDialog("Job agency", null, OnConfirm); + GameManager.Instance.UI.ShowTabObtionsDialog(_dialogSO, null, OnConfirm); } private void OnConfirm(JobInfoSO selectedJob) diff --git a/Assets/Scripts/InteractableObjects/SecretaryDesk.cs b/Assets/Scripts/InteractableObjects/SecretaryDesk.cs new file mode 100644 index 00000000..a43187de --- /dev/null +++ b/Assets/Scripts/InteractableObjects/SecretaryDesk.cs @@ -0,0 +1,26 @@ +using Assets.Scripts.Interfaces; +using UnityEngine; + +public class SecretaryDesk : BaseInteractableObject +{ + [SerializeField] + private DialogSO _dialogSO; + [SerializeField] + private DialogCategorySO _dialogOptionsSO; + + protected override void PrepareMenuActions() + { + _menuActions[RadialMenuActions.Talk].IsEnabled = true; + } + + protected override void InteractAction(RadialMenuActions interactAction) + { + GameManager.Instance.UI.ShowTabObtionsDialog(_dialogSO, null, OnConfirm); + } + + private void OnConfirm(IDialogOption selectedOption) + { + //_player.JobPosition = (selectedOption as EducationInfoSO).JobPosition; + print($"player selected position is {_player.JobPosition}"); + } +} diff --git a/Assets/Scripts/InteractableObjects/SecretaryDesk.cs.meta b/Assets/Scripts/InteractableObjects/SecretaryDesk.cs.meta new file mode 100644 index 00000000..e8b0b799 --- /dev/null +++ b/Assets/Scripts/InteractableObjects/SecretaryDesk.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 05e7f5c95d24c174ba832e4264e9d224 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Interfaces/IDialogOption.cs b/Assets/Scripts/Interfaces/IDialogOption.cs new file mode 100644 index 00000000..b9864a07 --- /dev/null +++ b/Assets/Scripts/Interfaces/IDialogOption.cs @@ -0,0 +1,13 @@ +using UnityEngine; + +namespace Assets.Scripts.Interfaces +{ + public interface IDialogItemUI + { + void SetItem(DialogOptionsUI parent, IDialogOption item); + } + public class IDialogOption: ScriptableObject + { + public Sprite Icon; + } +} diff --git a/Assets/Scripts/Interfaces/IDialogOption.cs.meta b/Assets/Scripts/Interfaces/IDialogOption.cs.meta new file mode 100644 index 00000000..033df5d1 --- /dev/null +++ b/Assets/Scripts/Interfaces/IDialogOption.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: d84ba9398a2968044a2323f3fe5c241a \ No newline at end of file diff --git a/Assets/Scripts/ScriptableObjects/DialogCategorySO.cs b/Assets/Scripts/ScriptableObjects/DialogCategorySO.cs new file mode 100644 index 00000000..b0c80a3c --- /dev/null +++ b/Assets/Scripts/ScriptableObjects/DialogCategorySO.cs @@ -0,0 +1,11 @@ +using Assets.Scripts.Interfaces; +using System.Collections.Generic; +using UnityEngine; + +[CreateAssetMenu()] +public class DialogCategorySO : ScriptableObject +{ + public string Title; + public Sprite Icon; + public List OptionsList; +} diff --git a/Assets/Scripts/ScriptableObjects/JobsListSO.cs.meta b/Assets/Scripts/ScriptableObjects/DialogCategorySO.cs.meta similarity index 100% rename from Assets/Scripts/ScriptableObjects/JobsListSO.cs.meta rename to Assets/Scripts/ScriptableObjects/DialogCategorySO.cs.meta diff --git a/Assets/Scripts/ScriptableObjects/DialogSO.cs b/Assets/Scripts/ScriptableObjects/DialogSO.cs new file mode 100644 index 00000000..1577381f --- /dev/null +++ b/Assets/Scripts/ScriptableObjects/DialogSO.cs @@ -0,0 +1,11 @@ +using Assets.Scripts.Interfaces; +using System.Collections.Generic; +using UnityEngine; + +[CreateAssetMenu()] +public class DialogSO : ScriptableObject +{ + public string Title; + public MonoBehaviour UITemplate; + public List CategoriesSO; +} diff --git a/Assets/Scripts/ScriptableObjects/DialogSO.cs.meta b/Assets/Scripts/ScriptableObjects/DialogSO.cs.meta new file mode 100644 index 00000000..9eddd81b --- /dev/null +++ b/Assets/Scripts/ScriptableObjects/DialogSO.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: bf7ee1c503cbe524b8a52dc86566b3b6 \ No newline at end of file diff --git a/Assets/Scripts/ScriptableObjects/EducationInfoSO.cs b/Assets/Scripts/ScriptableObjects/EducationInfoSO.cs new file mode 100644 index 00000000..d660ce7a --- /dev/null +++ b/Assets/Scripts/ScriptableObjects/EducationInfoSO.cs @@ -0,0 +1,10 @@ +using Assets.Scripts.Interfaces; +using UnityEngine; + +[CreateAssetMenu()] +public class EducationInfoSO : IDialogOption +{ + public string Description; + public float Price; + public EducationSkill Skill; +} diff --git a/Assets/Scripts/ScriptableObjects/EducationInfoSO.cs.meta b/Assets/Scripts/ScriptableObjects/EducationInfoSO.cs.meta new file mode 100644 index 00000000..f56082da --- /dev/null +++ b/Assets/Scripts/ScriptableObjects/EducationInfoSO.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3ba71c02cddb93d408c7c1b2f9846099 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/ScriptableObjects/JobInfoSO.cs b/Assets/Scripts/ScriptableObjects/JobInfoSO.cs index e7665c35..396c4c11 100644 --- a/Assets/Scripts/ScriptableObjects/JobInfoSO.cs +++ b/Assets/Scripts/ScriptableObjects/JobInfoSO.cs @@ -1,11 +1,11 @@ using UnityEngine; +using Assets.Scripts.Interfaces; [CreateAssetMenu()] -public class JobInfoSO : ScriptableObject +public class JobInfoSO : IDialogOption { public string Description; public float Salary; - public Sprite Icon; public JobPositions JobPosition; public EducationSkill MinimumEducationSkill; } diff --git a/Assets/Scripts/ScriptableObjects/JobPositions/Clerk.asset b/Assets/Scripts/ScriptableObjects/JobPositions/Clerk.asset index e1e3dd46..61e407ac 100644 --- a/Assets/Scripts/ScriptableObjects/JobPositions/Clerk.asset +++ b/Assets/Scripts/ScriptableObjects/JobPositions/Clerk.asset @@ -12,8 +12,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5e5ea608dd4175941b878e8e1a585970, type: 3} m_Name: Clerk m_EditorClassIdentifier: + Icon: {fileID: 0} Description: Clerk Salary: 5 - Icon: {fileID: 0} - JobPosition: 2 - MinimumEducationSkill: 1 + JobPosition: 0 + MinimumEducationSkill: 0 diff --git a/Assets/Scripts/ScriptableObjects/JobPositions/JobAgency.asset b/Assets/Scripts/ScriptableObjects/JobPositions/JobAgency.asset new file mode 100644 index 00000000..aaab47be --- /dev/null +++ b/Assets/Scripts/ScriptableObjects/JobPositions/JobAgency.asset @@ -0,0 +1,20 @@ +%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: bf7ee1c503cbe524b8a52dc86566b3b6, type: 3} + m_Name: JobAgency + m_EditorClassIdentifier: + Title: Job Agency + UITemplate: {fileID: 4899774397145829728, guid: 3fd1d54e5064a0841972b791abc6919f, + type: 3} + CategoriesSO: + - {fileID: 11400000, guid: 137a0a77aa02f614ead909f23a670e95, type: 2} + - {fileID: 11400000, guid: f0d3baaabf19f9a4a80e227316362d84, type: 2} diff --git a/Assets/Scripts/ScriptableObjects/JobPositions/JobAgency.asset.meta b/Assets/Scripts/ScriptableObjects/JobPositions/JobAgency.asset.meta new file mode 100644 index 00000000..cccdeae2 --- /dev/null +++ b/Assets/Scripts/ScriptableObjects/JobPositions/JobAgency.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8c330d22202c025408b0fcf250a57d15 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/ScriptableObjects/JobPositions/Manager.asset b/Assets/Scripts/ScriptableObjects/JobPositions/Manager.asset index f7ed16e1..4f7f27b7 100644 --- a/Assets/Scripts/ScriptableObjects/JobPositions/Manager.asset +++ b/Assets/Scripts/ScriptableObjects/JobPositions/Manager.asset @@ -12,8 +12,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5e5ea608dd4175941b878e8e1a585970, type: 3} m_Name: Manager m_EditorClassIdentifier: + Icon: {fileID: 0} Description: Manager Salary: 9 - Icon: {fileID: 0} - JobPosition: 4 - MinimumEducationSkill: 3 + JobPosition: 0 + MinimumEducationSkill: 0 diff --git a/Assets/Scripts/ScriptableObjects/JobPositions/ManagerAssistant.asset b/Assets/Scripts/ScriptableObjects/JobPositions/ManagerAssistant.asset index bf4f6932..2aa6fc02 100644 --- a/Assets/Scripts/ScriptableObjects/JobPositions/ManagerAssistant.asset +++ b/Assets/Scripts/ScriptableObjects/JobPositions/ManagerAssistant.asset @@ -12,8 +12,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5e5ea608dd4175941b878e8e1a585970, type: 3} m_Name: ManagerAssistant m_EditorClassIdentifier: + Icon: {fileID: 0} Description: Manager assistaint Salary: 6 - Icon: {fileID: 0} - JobPosition: 3 - MinimumEducationSkill: 2 + JobPosition: 0 + MinimumEducationSkill: 0 diff --git a/Assets/Scripts/ScriptableObjects/JobPositions/Minimarket.asset b/Assets/Scripts/ScriptableObjects/JobPositions/Minimarket.asset index 16a14dc0..0982a11e 100644 --- a/Assets/Scripts/ScriptableObjects/JobPositions/Minimarket.asset +++ b/Assets/Scripts/ScriptableObjects/JobPositions/Minimarket.asset @@ -12,9 +12,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f667daa0686227b49a9ca2ebd6326a98, type: 3} m_Name: Minimarket m_EditorClassIdentifier: - Place: Shop + Title: Mini market Icon: {fileID: 21300000, guid: c5e761867408abd48bdbfcc36c949f44, type: 3} - JobPositionsList: + OptionsList: - {fileID: 11400000, guid: c7452dc6dfb2cc040a6d0e543db6b671, type: 2} - - {fileID: 11400000, guid: 36ad6fbffd0cc574aaf7d76308d965a1, type: 2} - {fileID: 11400000, guid: 4381db145ac80514c957374e20392b3b, type: 2} + - {fileID: 11400000, guid: 36ad6fbffd0cc574aaf7d76308d965a1, type: 2} diff --git a/Assets/Scripts/ScriptableObjects/JobPositions/Office.asset b/Assets/Scripts/ScriptableObjects/JobPositions/Office.asset index 09516bc3..50f2d6e6 100644 --- a/Assets/Scripts/ScriptableObjects/JobPositions/Office.asset +++ b/Assets/Scripts/ScriptableObjects/JobPositions/Office.asset @@ -12,9 +12,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f667daa0686227b49a9ca2ebd6326a98, type: 3} m_Name: Office m_EditorClassIdentifier: - Place: Office + Title: Office Icon: {fileID: 21300000, guid: c5e761867408abd48bdbfcc36c949f44, type: 3} - JobPositionsList: + OptionsList: - {fileID: 11400000, guid: 9dd346cdfec57ee47ad1c06a925769bb, type: 2} - - {fileID: 11400000, guid: 36ad6fbffd0cc574aaf7d76308d965a1, type: 2} - {fileID: 11400000, guid: 4381db145ac80514c957374e20392b3b, type: 2} + - {fileID: 11400000, guid: 36ad6fbffd0cc574aaf7d76308d965a1, type: 2} diff --git a/Assets/Scripts/ScriptableObjects/JobsListSO.cs b/Assets/Scripts/ScriptableObjects/JobsListSO.cs deleted file mode 100644 index 82344a56..00000000 --- a/Assets/Scripts/ScriptableObjects/JobsListSO.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UIElements; - -[CreateAssetMenu()] -public class JobsListSO : ScriptableObject -{ - public string Place; - public Sprite Icon; - public List JobPositionsList; -} diff --git a/Assets/Scripts/UIElements/JobSelectorUI.cs b/Assets/Scripts/UIElements/DialogOptionsUI.cs similarity index 60% rename from Assets/Scripts/UIElements/JobSelectorUI.cs rename to Assets/Scripts/UIElements/DialogOptionsUI.cs index 50447540..7b629f92 100644 --- a/Assets/Scripts/UIElements/JobSelectorUI.cs +++ b/Assets/Scripts/UIElements/DialogOptionsUI.cs @@ -1,10 +1,9 @@ using System; -using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; -public class JobSelectorUI : MonoBehaviour +public class DialogOptionsUI : MonoBehaviour { [SerializeField] private TextMeshProUGUI _title; @@ -22,28 +21,30 @@ public class JobSelectorUI : MonoBehaviour [SerializeField] private JobItemUITemplate _jobItemUItemplate; [SerializeField] - private JobTabUITemplate _jobTabUItemplate; - [SerializeField] - private List _jobs; - - private JobTabUITemplate _selectedTab; + private DialogTabUITemplate _dialogTabUI; + + private DialogTabUITemplate _selectedTab; private JobItemUITemplate _selectedItem; + private DialogSO _dialogSO; - public void ShowJobSelectionDialog(string title, Action onCancel, Action onConfirm) + public void ShowCategoriesDialog(DialogSO dialogSO, Action onCancel, Action onConfirm) { GameManager.Instance.UI.Freeze(); + _dialogSO = dialogSO; + gameObject.SetActive(true); - _title.text = title; + _title.text = _dialogSO.Title; //Create Tabs - for (int count = 0; count < _jobs.Count; count++) + for (int count = 0; count < _dialogSO.CategoriesSO.Count; count++) { - JobsListSO job = _jobs[count]; - var itemUI = Instantiate(_jobTabUItemplate, _tabsContainer); + var dialogOption = _dialogSO.CategoriesSO[count]; + var itemUI = Instantiate(_dialogTabUI, _tabsContainer); itemUI.gameObject.SetActive(true); - var template = itemUI.GetComponent(); - template.SetItem(this, job); + var template = itemUI.GetComponent(); + + template.SetItem(this, dialogOption); if (count== 0) { OnTabSelected(template); } @@ -61,30 +62,28 @@ public class JobSelectorUI : MonoBehaviour }); } - public void OnTabEnter(JobTabUITemplate button) + public void OnTabEnter(DialogTabUITemplate button) { - print($"enter to {button.JobListItem.name}"); + print($"enter to {button.DialogOption.name}"); } - public void OnTabSelected(JobTabUITemplate button) + public void OnTabSelected(DialogTabUITemplate button) { _selectedTab = button; - _subTitle.text = _selectedTab.JobListItem.Place; + _subTitle.text = _selectedTab.DialogOption.Title; while (_itemsContainer.childCount > 0) { DestroyImmediate(_itemsContainer.GetChild(0).gameObject); } - foreach (var job in _selectedTab.JobListItem.JobPositionsList) + foreach (var job in _selectedTab.DialogOption.OptionsList) { - var itemUI = Instantiate(_jobItemUItemplate, _itemsContainer); + var itemUI = Instantiate(_dialogSO.UITemplate, _itemsContainer); itemUI.gameObject.SetActive(true); - itemUI.GetComponent().SetItem(this,job); + itemUI.GetComponent().SetItem(this, job); } - print($"selected {button.JobListItem.name}"); } - public void OnTabExit(JobTabUITemplate button) + public void OnTabExit(DialogTabUITemplate button) { - print($"exit {button.JobListItem.name}"); } public void OnItemSelected(JobItemUITemplate button) @@ -104,5 +103,4 @@ public class JobSelectorUI : MonoBehaviour gameObject.SetActive(false); CloseDialog(); } -} - +} \ No newline at end of file diff --git a/Assets/Scripts/UIElements/JobSelectorUI.cs.meta b/Assets/Scripts/UIElements/DialogOptionsUI.cs.meta similarity index 100% rename from Assets/Scripts/UIElements/JobSelectorUI.cs.meta rename to Assets/Scripts/UIElements/DialogOptionsUI.cs.meta diff --git a/Assets/Scripts/UIElements/JobTabUITemplate.cs b/Assets/Scripts/UIElements/DialogTabUITemplate.cs similarity index 57% rename from Assets/Scripts/UIElements/JobTabUITemplate.cs rename to Assets/Scripts/UIElements/DialogTabUITemplate.cs index 2fa84d1a..ceb917d6 100644 --- a/Assets/Scripts/UIElements/JobTabUITemplate.cs +++ b/Assets/Scripts/UIElements/DialogTabUITemplate.cs @@ -3,22 +3,22 @@ using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; -public class JobTabUITemplate : MonoBehaviour, IPointerEnterHandler,IPointerClickHandler, IPointerExitHandler +public class DialogTabUITemplate : MonoBehaviour, IPointerEnterHandler,IPointerClickHandler, IPointerExitHandler { [SerializeField] private TextMeshProUGUI _description; [SerializeField] private Image _icon; - public JobsListSO JobListItem=> _jobListItem; - private JobsListSO _jobListItem; + public DialogCategorySO DialogOption=> _dialogOption; + private DialogCategorySO _dialogOption; - private JobSelectorUI _parent; - public void SetItem(JobSelectorUI parent, JobsListSO jobListItem) + private DialogOptionsUI _parent; + public void SetItem(DialogOptionsUI parent, DialogCategorySO dialogOption) { - _jobListItem = jobListItem; + _dialogOption = dialogOption; _parent = parent; - _icon.sprite = jobListItem.Icon; + _icon.sprite = _dialogOption.Icon; } public void OnPointerClick(PointerEventData eventData) diff --git a/Assets/Scripts/UIElements/JobTabUITemplate.cs.meta b/Assets/Scripts/UIElements/DialogTabUITemplate.cs.meta similarity index 100% rename from Assets/Scripts/UIElements/JobTabUITemplate.cs.meta rename to Assets/Scripts/UIElements/DialogTabUITemplate.cs.meta diff --git a/Assets/Scripts/UIElements/JobItemUITemplate.cs b/Assets/Scripts/UIElements/JobItemUITemplate.cs index 9391a011..c5415e3e 100644 --- a/Assets/Scripts/UIElements/JobItemUITemplate.cs +++ b/Assets/Scripts/UIElements/JobItemUITemplate.cs @@ -1,9 +1,10 @@ +using Assets.Scripts.Interfaces; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; -public class JobItemUITemplate : MonoBehaviour, IPointerEnterHandler +public class JobItemUITemplate : MonoBehaviour, IDialogItemUI ,IPointerEnterHandler { [SerializeField] private TextMeshProUGUI _descreiption; @@ -15,18 +16,18 @@ public class JobItemUITemplate : MonoBehaviour, IPointerEnterHandler [SerializeField] private Button _button; - private JobSelectorUI _parent; + private DialogOptionsUI _parent; private JobInfoSO _item; public JobInfoSO Item=> _item; - public void SetItem(JobSelectorUI parent,JobInfoSO item) + public void SetItem(DialogOptionsUI parent,IDialogOption item) { - _item= item; + _item= item as JobInfoSO; _parent = parent; - _descreiption.text = item.Description; - _sallary.text = $"{item.Salary}$"; + _descreiption.text = _item.Description; + _sallary.text = $"{_item.Salary}$"; _icon.sprite = item.Icon; - _button.enabled = Player.Instance.Education>=item.MinimumEducationSkill; + _button.enabled = Player.Instance.Education>= _item.MinimumEducationSkill; } diff --git a/Assets/Scripts/UIElements/UISystem.cs b/Assets/Scripts/UIElements/UISystem.cs index 9a57079c..66f0ffa7 100644 --- a/Assets/Scripts/UIElements/UISystem.cs +++ b/Assets/Scripts/UIElements/UISystem.cs @@ -8,7 +8,7 @@ public class UISystem : MonoBehaviour [SerializeField] private TimeSliderUI _timeSliderPrefab; [SerializeField] - private JobSelectorUI _jobSelectorPrefab; + private DialogOptionsUI _DialogUIPrefab; [SerializeField] private GameObject _blurOverlay; [SerializeField] @@ -27,10 +27,10 @@ public class UISystem : MonoBehaviour timeSlider.ShowTimeSliderDialog(title, description, onCancel, onConfirm); } - public void ShowJobSelectionDialog(string title, Action onCancel, Action onConfirm) + public void ShowTabObtionsDialog(DialogSO dialogSO, Action onCancel, Action onConfirm) { - var jobSelector = Instantiate(_jobSelectorPrefab, transform); - jobSelector.ShowJobSelectionDialog(title, onCancel, onConfirm); + var dialog = Instantiate(_DialogUIPrefab, transform); + dialog.ShowCategoriesDialog(dialogSO, onCancel, onConfirm); } public async UniTask ShowItemPopupMenu(Dictionary actions)