diff --git a/Assets/Scenes/CityOutside.unity b/Assets/Scenes/CityOutside.unity index bd917161..51244ab1 100644 --- a/Assets/Scenes/CityOutside.unity +++ b/Assets/Scenes/CityOutside.unity @@ -274,7 +274,7 @@ Transform: - {fileID: 1152324441} - {fileID: 1382752553} m_Father: {fileID: 0} - m_RootOrder: 8 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &107380536 GameObject: @@ -2773,7 +2773,7 @@ Transform: - {fileID: 712058892} - {fileID: 723568106} m_Father: {fileID: 0} - m_RootOrder: 7 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} --- !u!1 &307039698 GameObject: @@ -2804,8 +2804,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 98af8458d80ad3a489a169272f679b4c, type: 3} m_Name: m_EditorClassIdentifier: - _timeMultiplier: 2000 - _startHour: 12 + _startHour: 9 _sunLight: {fileID: 705507994} _sunriseHour: 7 _sunsetHour: 20.5 @@ -2847,6 +2846,7 @@ MonoBehaviour: _maxSunLightIntensity: 1 _moonLight: {fileID: 448269317} _maxMoonLightIntensity: 0.5 + _minuteToRealTime: 0.5 --- !u!4 &307039700 Transform: m_ObjectHideFlags: 0 @@ -3204,12 +3204,12 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 448269316} m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: -22.298813, y: -3.8542924, z: 7.9937162} + m_LocalPosition: {x: -223.0188, y: -581.07855, z: 8.663528} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 5 + m_Father: {fileID: 1504187455} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} --- !u!1 &497576565 GameObject: @@ -3243,6 +3243,7 @@ RectTransform: - {fileID: 1006389537} - {fileID: 1235246448} - {fileID: 1613486730} + - {fileID: 737469174} m_Father: {fileID: 329780516} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -3251,6 +3252,82 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 22.531006} m_SizeDelta: {x: 0, y: -45.062} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &548419713 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 548419714} + - component: {fileID: 548419716} + - component: {fileID: 548419715} + m_Layer: 5 + m_Name: Border + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &548419714 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 548419713} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1326618497} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -0.22940063, y: 0} + m_SizeDelta: {x: 0.4588, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &548419715 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 548419713} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.2677999, g: 0.3081395, b: 0.3207547, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &548419716 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 548419713} + m_CullTransparentMesh: 1 --- !u!1 &631616956 GameObject: m_ObjectHideFlags: 0 @@ -3604,12 +3681,12 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 705507993} m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 100, z: 0} + m_LocalPosition: {x: -200.71999, y: -477.22424, z: 0.6698125} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 + m_Father: {fileID: 1504187455} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} --- !u!1 &712058891 GameObject: @@ -3806,6 +3883,44 @@ Transform: m_Father: {fileID: 274182514} m_RootOrder: 18 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &737469173 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 737469174} + m_Layer: 5 + m_Name: Food + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &737469174 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 737469173} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1326618497} + - {fileID: 1764865642} + m_Father: {fileID: 497576566} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -337.8, y: -17.039} + m_SizeDelta: {x: 100, y: 21.462} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &779251533 GameObject: m_ObjectHideFlags: 0 @@ -3991,7 +4106,7 @@ PrefabInstance: m_Modifications: - target: {fileID: -8679921383154817045, guid: 32790d47acc86814982f18993097a759, type: 3} propertyPath: m_RootOrder - value: 10 + value: 9 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 32790d47acc86814982f18993097a759, type: 3} propertyPath: m_LocalScale.x @@ -4909,7 +5024,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -4.39, y: -0.6} + m_AnchoredPosition: {x: -4.200001, y: -0.000024795532} m_SizeDelta: {x: -16.4603, y: -13.6867} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &910851332 @@ -4959,7 +5074,7 @@ MonoBehaviour: m_MinValue: 0 m_MaxValue: 100 m_WholeNumbers: 0 - m_Value: 0 + m_Value: 52.4 m_OnValueChanged: m_PersistentCalls: m_Calls: [] @@ -6297,8 +6412,98 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 6 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1326618496 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1326618497} + - component: {fileID: 1326618498} + m_Layer: 5 + m_Name: Bar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1326618497 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1326618496} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 548419714} + - {fileID: 2085197806} + m_Father: {fileID: 737469174} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -4.200001, y: -0.000024795532} + m_SizeDelta: {x: -16.4603, y: -13.6867} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1326618498 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1326618496} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 67db9e8f0e2ae9c40bc1e2b64352a6b4, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 0} + m_FillRect: {fileID: 2085197806} + m_HandleRect: {fileID: 0} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 100 + m_WholeNumbers: 0 + m_Value: 51.7 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] --- !u!1 &1328115571 GameObject: m_ObjectHideFlags: 0 @@ -11251,7 +11456,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 11 + m_RootOrder: 10 m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} --- !u!1 &1366991730 GameObject: @@ -11495,6 +11700,39 @@ Rigidbody: m_Interpolate: 0 m_Constraints: 0 m_CollisionDetection: 0 +--- !u!1 &1504187454 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1504187455} + m_Layer: 0 + m_Name: Lights + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1504187455 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1504187454} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 200.71999, y: 577.22424, z: -0.6698125} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 705507995} + - {fileID: 448269318} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1550470208 GameObject: m_ObjectHideFlags: 0 @@ -11561,7 +11799,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1552961642 GameObject: @@ -11941,7 +12179,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.9245283, g: 0.6511125, b: 0.12646852, a: 1} + m_Color: {r: 0.5529412, g: 0.9254902, b: 0.1254902, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 @@ -12432,6 +12670,82 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1726465720} m_CullTransparentMesh: 1 +--- !u!1 &1764865641 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1764865642} + - component: {fileID: 1764865644} + - component: {fileID: 1764865643} + m_Layer: 5 + m_Name: Icon + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1764865642 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1764865641} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 737469174} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -42.5, y: 0} + m_SizeDelta: {x: 13, y: 14} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1764865643 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1764865641} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: bc479ad3f781c4540995d023a62d8c1d, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1764865644 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1764865641} + m_CullTransparentMesh: 1 --- !u!1 &1791787532 GameObject: m_ObjectHideFlags: 0 @@ -12756,7 +13070,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 9 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &2051386990 GameObject: @@ -12969,6 +13283,82 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2068384140} m_CullTransparentMesh: 1 +--- !u!1 &2085197805 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2085197806} + - component: {fileID: 2085197808} + - component: {fileID: 2085197807} + m_Layer: 5 + m_Name: Fill + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2085197806 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2085197805} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1326618497} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: -0.16749573, y: 0} + m_SizeDelta: {x: 0.58259, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2085197807 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2085197805} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.5539218, g: 0.9254902, b: 0.1254902, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &2085197808 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2085197805} + m_CullTransparentMesh: 1 --- !u!1 &2089282901 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Actions/BaseAction.cs b/Assets/Scripts/Actions/BaseAction.cs index 66044235..9d41ed41 100644 --- a/Assets/Scripts/Actions/BaseAction.cs +++ b/Assets/Scripts/Actions/BaseAction.cs @@ -1,16 +1,16 @@ -namespace Assets.Scripts.Actions -{ - public abstract class BaseAction - { - protected int DurationInTicks { get; } - protected int ElapsedTicks { get; } - - protected BaseAction(int durationTicks) - { - DurationInTicks = durationTicks; - } - - public abstract void ApplyAction(PlayerController playerController); - - } +namespace Assets.Scripts.Actions +{ + public abstract class BaseAction + { + protected int DurationInTicks { get; } + protected int ElapsedTicks { get; } + + protected BaseAction(int durationTicks) + { + DurationInTicks = durationTicks; + } + + public abstract void ApplyAction(PlayerManager playerController); + + } } \ No newline at end of file diff --git a/Assets/Scripts/Actions/Eat.cs b/Assets/Scripts/Actions/Eat.cs index 1d11d8c7..1fa162c1 100644 --- a/Assets/Scripts/Actions/Eat.cs +++ b/Assets/Scripts/Actions/Eat.cs @@ -5,17 +5,17 @@ namespace Assets.Scripts.Actions public class Eat : BaseAction, ISellableItem { public float Price { get; private set; } - private int _energyPerTick; - public Eat(int duration, int energyPerTick, float price) : base(duration) + private int _energy; + public Eat(int duration, int energy, float price) : base(duration) { Price = price; - _energyPerTick = energyPerTick; + _energy = energy; } - public override void ApplyAction(PlayerController playerController) + public override void ApplyAction(PlayerManager playerController) { - playerController.foodEnergy.increase(_energyPerTick); + playerController.food.increase(_energy); } } } diff --git a/Assets/Scripts/Actions/Relax.cs b/Assets/Scripts/Actions/Relax.cs index 567cbbf1..ec9cd953 100644 --- a/Assets/Scripts/Actions/Relax.cs +++ b/Assets/Scripts/Actions/Relax.cs @@ -7,7 +7,7 @@ { _energyPerTick = energyPerTick; } - public override void ApplyAction(PlayerController playerController) + public override void ApplyAction(PlayerManager playerController) { playerController.energy.increase(_energyPerTick); } diff --git a/Assets/Scripts/Actions/Work.cs b/Assets/Scripts/Actions/Work.cs index 9b3b7c26..79d9b86e 100644 --- a/Assets/Scripts/Actions/Work.cs +++ b/Assets/Scripts/Actions/Work.cs @@ -1,17 +1,17 @@ -namespace Assets.Scripts.Actions -{ - public class Work : BaseAction - { - private PlayerController playerController; - private int energyPerTick; - public Work(PlayerController player, int duration, int energyPerTick) : base(duration) - { - this.playerController = player; - this.energyPerTick = energyPerTick; - } - public override void ApplyAction(PlayerController playerController) - { - throw new System.NotImplementedException(); - } - } -} +namespace Assets.Scripts.Actions +{ + public class Work : BaseAction + { + private PlayerManager playerController; + private int energyPerTick; + public Work(PlayerManager player, int duration, int energyPerTick) : base(duration) + { + this.playerController = player; + this.energyPerTick = energyPerTick; + } + public override void ApplyAction(PlayerManager playerController) + { + throw new System.NotImplementedException(); + } + } +} diff --git a/Assets/Scripts/Buildings/Burger.cs b/Assets/Scripts/Buildings/Burger.cs index 9073b6d5..2ca21e17 100644 --- a/Assets/Scripts/Buildings/Burger.cs +++ b/Assets/Scripts/Buildings/Burger.cs @@ -1,23 +1,23 @@ -using Assets.Scripts.Actions; - -namespace Assets.Scripts.Buildings -{ - public class Burger : BaseCell - { - protected override void Initialize() - { - _name = "Monolith burger"; - } - - protected override void BuildOptionsList() - { - _optionsList.Add("Hamburgers - 83$", new Eat(6, 1, 83)); - _optionsList.Add("Cheesburger - 94$", new Eat(6, 1, 94)); - _optionsList.Add("Astro chicken - 131$", new Eat(6, 1, 131)); - _optionsList.Add("Fries - 68$", new Eat(6, 1, 68)); - _optionsList.Add("Shakes - 108$", new Eat(6, 1, 108)); - _optionsList.Add("Colas - 73$", new Eat(6, 1, 73)); - } - - } -} +using Assets.Scripts.Actions; + +namespace Assets.Scripts.Buildings +{ + public class Burger : BaseCell + { + protected override void Initialize() + { + _name = "Monolith burger"; + } + + protected override void BuildOptionsList() + { + _optionsList.Add("Hamburgers - 83$", new Eat(6, 10, 83)); + _optionsList.Add("Cheesburger - 94$", new Eat(6, 1, 94)); + _optionsList.Add("Astro chicken - 131$", new Eat(6, 1, 131)); + _optionsList.Add("Fries - 68$", new Eat(6, 1, 68)); + _optionsList.Add("Shakes - 108$", new Eat(6, 1, 108)); + _optionsList.Add("Colas - 73$", new Eat(6, 1, 73)); + } + + } +} diff --git a/Assets/Scripts/CharacterMovement.cs b/Assets/Scripts/CharacterMovement.cs deleted file mode 100644 index 0e88111f..00000000 --- a/Assets/Scripts/CharacterMovement.cs +++ /dev/null @@ -1,47 +0,0 @@ -using UnityEngine; -using UnityEngine.AI; - -public class CharacterMovement : MonoBehaviour -{ - public NavMeshAgent player; - public Animator playerAnimator; - public Camera playerCamera; - public ParticleSystem targetDest; - public bool allowMovement=true; - - void Start() - { - allowMovement = true; - } - // Update is called once per frame - void Update() - { - if (allowMovement) - { - if (Input.GetMouseButton(0)) - { - Ray myRay = playerCamera.ScreenPointToRay(Input.mousePosition); - - if (Physics.Raycast(myRay, out RaycastHit hit)) - { - targetDest.transform.position = hit.point; - targetDest.Play(); - player.SetDestination(hit.point); - } - } - } - else - { - player.SetDestination(player.transform.position); - player.velocity=Vector3.zero; - } - if(player.velocity!=Vector3.zero) - { - playerAnimator.SetBool("IsWalking",true); - } - else if (player.velocity == Vector3.zero) - { - playerAnimator.SetBool("IsWalking", false); - } - } -} diff --git a/Assets/Scripts/CharacterMovement.cs.meta b/Assets/Scripts/CharacterMovement.cs.meta deleted file mode 100644 index ac75a879..00000000 --- a/Assets/Scripts/CharacterMovement.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e34d78101f2c2b842864fce206379a7c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/DialogueSystem/ChoiceController.cs b/Assets/Scripts/DialogueSystem/ChoiceController.cs index 28438705..0306d21e 100644 --- a/Assets/Scripts/DialogueSystem/ChoiceController.cs +++ b/Assets/Scripts/DialogueSystem/ChoiceController.cs @@ -1,61 +1,46 @@ -using Assets.Scripts.Actions; -using System.Collections.Generic; -using TMPro; -using UnityEngine; -using UnityEngine.Events; -using UnityEngine.UI; - -[System.Serializable] -public class ConversationChangeEvent : UnityEvent { } - -public class ChoiceController : MonoBehaviour -{ - public PlayerController playerController; - public KeyValuePair _option; - public ConversationChangeEvent conversationChangeEvent; - // Update is called once per frame - public static ChoiceController AddChoiceButton(Button choiceButtonTemplate, KeyValuePair option, int index) - { - int buttonSpacing = -50; - - Button button = Instantiate(choiceButtonTemplate); - - button.transform.SetParent(choiceButtonTemplate.transform.parent); - button.transform.localScale = Vector3.one; - button.transform.localPosition = choiceButtonTemplate.transform.localPosition + new Vector3(0, index * buttonSpacing, 0); - button.name = option.Key; - button.gameObject.SetActive(true); - ChoiceController choiceController = button.GetComponent(); - choiceController._option = option; - return choiceController; - } - - private void Start() - { - if (conversationChangeEvent == null) - conversationChangeEvent = new ConversationChangeEvent(); - var btn = GetComponent