From 567fc7a1c204b4bbf78a14cbe29fd997cda7a56e Mon Sep 17 00:00:00 2001 From: Valdimir Date: Sun, 24 Mar 2024 22:54:51 +0200 Subject: [PATCH] issue with fridge and OnContainerChanged --- Assets/Scenes/House.unity | 18 +++++++++--------- Assets/Scenes/MiniMarket.unity | 5 +++++ Assets/Scripts/Managers/CameraPlayerFollow.cs | 12 ++++++------ Assets/Scripts/Player/Player.cs | 3 ++- ProjectSettings/ProjectVersion.txt | 4 ++-- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/Assets/Scenes/House.unity b/Assets/Scenes/House.unity index f47d57db..8e78c984 100644 --- a/Assets/Scenes/House.unity +++ b/Assets/Scenes/House.unity @@ -868,7 +868,7 @@ Transform: m_GameObject: {fileID: 222033746} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.629, y: 2.599, z: 0.52} + m_LocalPosition: {x: -0.629, y: 2.25, z: 0.52} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -908,8 +908,8 @@ Light: serializedVersion: 11 m_Type: 2 m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 15 - m_Range: 5 + m_Intensity: 3 + m_Range: 3 m_SpotAngle: 30 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 @@ -4429,7 +4429,7 @@ Transform: m_GameObject: {fileID: 1743375285} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.57, y: 2.599, z: 2.97} + m_LocalPosition: {x: -0.57, y: 2.26, z: 2.97} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -4469,8 +4469,8 @@ Light: serializedVersion: 11 m_Type: 2 m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 10 - m_Range: 5 + m_Intensity: 2 + m_Range: 2 m_SpotAngle: 30 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 @@ -5270,7 +5270,7 @@ Transform: m_GameObject: {fileID: 1994430549} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.371, y: 2.599, z: -2.48} + m_LocalPosition: {x: 0.371, y: 1.05, z: -2.48} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -5310,8 +5310,8 @@ Light: serializedVersion: 11 m_Type: 2 m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 15 - m_Range: 5 + m_Intensity: 5 + m_Range: 4 m_SpotAngle: 30 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 diff --git a/Assets/Scenes/MiniMarket.unity b/Assets/Scenes/MiniMarket.unity index 717df4fb..99d998d7 100644 --- a/Assets/Scenes/MiniMarket.unity +++ b/Assets/Scenes/MiniMarket.unity @@ -17674,6 +17674,11 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 1322861160939933662} m_Modifications: + - target: {fileID: 551020291880888998, guid: 1a6eb89c878bfd64babad29d36df197b, + type: 3} + propertyPath: _spawnPointInSceneName + value: MiniMarket + objectReference: {fileID: 0} - target: {fileID: 6206602907352978179, guid: 1a6eb89c878bfd64babad29d36df197b, type: 3} propertyPath: m_LocalPosition.x diff --git a/Assets/Scripts/Managers/CameraPlayerFollow.cs b/Assets/Scripts/Managers/CameraPlayerFollow.cs index cac18d49..4332359b 100644 --- a/Assets/Scripts/Managers/CameraPlayerFollow.cs +++ b/Assets/Scripts/Managers/CameraPlayerFollow.cs @@ -2,11 +2,11 @@ using UnityEngine; public class CameraPlayerFollow : MonoBehaviour { - private Vector3 _cameraOffset = new(0, 40, 0); + //private Vector3 _cameraOffset = new(0, 40, 0); - void LateUpdate() - { - Vector3 newPosition = - transform.position = Player.Instance.transform.position + _cameraOffset; - } + //void LateUpdate() + //{ + // Vector3 newPosition = + // transform.position = Player.Instance.transform.position + _cameraOffset; + //} } diff --git a/Assets/Scripts/Player/Player.cs b/Assets/Scripts/Player/Player.cs index 7acbf917..5f1b5eaa 100644 --- a/Assets/Scripts/Player/Player.cs +++ b/Assets/Scripts/Player/Player.cs @@ -66,6 +66,7 @@ public class Player : BaseCharacter { AddTask(new PlayerTasks(Tasks.Move, point)); } + public async void Interact(BaseInteractableObject interactionItem) { var result = await interactionItem.ShowPopupMenu(this); @@ -127,9 +128,9 @@ public class Player : BaseCharacter public void ClearContainerItem() { - OnContainerChanged.Invoke(this, false); Destroy(_containerItem.gameObject); _containerItem = null; + //OnContainerChanged.Invoke(this, false); } public ContainerItem GetContainerItem() diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 925932da..88b6f04b 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2023.2.10f1 -m_EditorVersionWithRevision: 2023.2.10f1 (316c1fd686f6) +m_EditorVersion: 2023.2.13f1 +m_EditorVersionWithRevision: 2023.2.13f1 (70197a359f36)