diff --git a/Assets/Scenes/City.unity b/Assets/Scenes/City.unity index d6c6d8e9..d3e8314c 100644 --- a/Assets/Scenes/City.unity +++ b/Assets/Scenes/City.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.17276844, g: 0.21589246, b: 0.2978263, a: 1} + m_IndirectSpecularColor: {r: 0.172768, g: 0.21589169, b: 0.29782546, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -1003,7 +1003,6 @@ MonoBehaviour: _startHour: 9 _sunriseHour: 7 _sunsetHour: 20.5 - _minuteToRealTime: 0.5 --- !u!4 &307039700 Transform: m_ObjectHideFlags: 0 @@ -2449,8 +2448,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 182.005, y: 0} - m_SizeDelta: {x: 364.01, y: 50} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &771379432 MonoBehaviour: @@ -2528,7 +2527,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 182.005, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 70} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &815467878 @@ -2958,7 +2957,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 957.94086, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &927596948 @@ -3247,7 +3246,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 674.0475, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &952219226 @@ -3389,7 +3388,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 963194225} m_LocalRotation: {x: 0.54491353, y: 0.00000002885483, z: -0.00000001875198, w: 0.8384923} - m_LocalPosition: {x: 29.11, y: 8.917, z: -54.39} + m_LocalPosition: {x: 29.11, y: 9, z: -54.39} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -4002,12 +4001,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1184343256} m_CullTransparentMesh: 1 ---- !u!4 &1189180335 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 3284961431740112560, guid: c0021857f236ae341a3c917b9da4dfaf, - type: 3} - m_PrefabInstance: {fileID: 603449532} - m_PrefabAsset: {fileID: 0} --- !u!95 &1189180339 Animator: serializedVersion: 5 @@ -9540,7 +9533,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 20, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1503626360 @@ -10832,7 +10825,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 275.15417, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1811096135 @@ -11054,7 +11047,7 @@ PrefabInstance: - target: {fileID: 3806516704876462308, guid: ea47665625ccfd4408f6411caf45f910, type: 3} propertyPath: m_AnchoredPosition.x - value: 182.005 + value: 0 objectReference: {fileID: 0} - target: {fileID: 3806516704876462308, guid: ea47665625ccfd4408f6411caf45f910, type: 3} @@ -11321,7 +11314,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1930563419} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 29.11, y: 0, z: -50.39} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -11377,7 +11370,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 182.005, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1964284071 @@ -12178,7 +12171,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2110938951} m_LocalRotation: {x: 0.54491353, y: 0.00000002885483, z: -0.00000001875198, w: 0.8384923} - m_LocalPosition: {x: 29.11, y: 8.917, z: -54.39} + m_LocalPosition: {x: 29.11, y: 9, z: -54.39} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -12204,8 +12197,8 @@ MonoBehaviour: m_StreamingVersion: 20170927 m_Priority: 10 m_StandbyUpdate: 2 - m_LookAt: {fileID: 1189180335} - m_Follow: {fileID: 1189180335} + m_LookAt: {fileID: 1930563420} + m_Follow: {fileID: 1930563420} m_Lens: FieldOfView: 60.000004 OrthographicSize: 5 diff --git a/Assets/Scripts/CameraSystem.cs b/Assets/Scripts/CameraSystem.cs index 55d5fea2..b624582a 100644 --- a/Assets/Scripts/CameraSystem.cs +++ b/Assets/Scripts/CameraSystem.cs @@ -6,10 +6,27 @@ public class CameraSystem : MonoBehaviour [SerializeField] private CinemachineVirtualCamera _camera; + private float _moveSpeed = 50f; private void Start() { - _camera.LookAt = Player.Instance.transform; - _camera.Follow = Player.Instance.transform; + transform.position = Player.Instance.transform.position; + //_camera.LookAt = Player.Instance.transform; + //_camera.Follow = Player.Instance.transform; + } + + private void Update() + { + Vector3 inputDir = Vector3.zero; + + if (Input.GetKey(KeyCode.W)) inputDir.z = +1f; + if (Input.GetKey(KeyCode.S)) inputDir.z = -1f; + if (Input.GetKey(KeyCode.A)) inputDir.x = -1f; + if (Input.GetKey(KeyCode.D)) inputDir.x = +1f; + + Vector3 moveDir = transform.forward * inputDir.z + transform.right * inputDir.x; + + //if (moveDir == Vector3.zero && Player.Instance.stat) transform.position = Player.Instance.transform.position; + transform.position += moveDir * _moveSpeed * Time.deltaTime; } }