diff --git a/Assets/scene.unity b/Assets/scene.unity index fd82057..770f9bd 100644 --- a/Assets/scene.unity +++ b/Assets/scene.unity @@ -21168,6 +21168,7 @@ MonoBehaviour: m_EditorClassIdentifier: targetPos: {x: 0, y: 0, z: 0} targetRot: {x: 0, y: 0, z: 0, w: 0} + initLocation: {fileID: 717116040} --- !u!81 &1859570686 AudioListener: m_ObjectHideFlags: 0 diff --git a/Assets/scripts/Clock.cs b/Assets/scripts/Clock.cs index 26db32b..4225962 100644 --- a/Assets/scripts/Clock.cs +++ b/Assets/scripts/Clock.cs @@ -25,9 +25,9 @@ public class Clock : MonoBehaviour { //TODO: Sync clock with the server //TODO: Set var as for day % or hour - float fRot = clock.transform.rotation.z; + float fRot = clock.transform.rotation.eulerAngles.z; - if(fRot>=0 && fRot>-180) { + if(fRot>=180) { clock.transform.Rotate(0, 0, (float)(Time.deltaTime * (-180.0)/maxNight));//2.5min } else {