diff --git a/Assets/Prefabs/Fish Spawner.prefab b/Assets/Prefabs/Fish Spawner.prefab index 1bdaa32..1795556 100644 --- a/Assets/Prefabs/Fish Spawner.prefab +++ b/Assets/Prefabs/Fish Spawner.prefab @@ -34,7 +34,7 @@ Transform: m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1634593922401586} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 10.24, y: 27.43, z: 0} + m_LocalPosition: {x: 3.39, y: 28.18, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} diff --git a/Assets/Prefabs/Terrain.prefab b/Assets/Prefabs/Terrain.prefab index 501087d..a995e9c 100644 --- a/Assets/Prefabs/Terrain.prefab +++ b/Assets/Prefabs/Terrain.prefab @@ -362,8 +362,8 @@ SpriteRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 + m_SortingLayerID: -1570049999 + m_SortingLayer: 2 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: 3504427cef78c5a4ea13eadb8bac91a5, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Scripts/Cannon.cs b/Assets/Scripts/Cannon.cs index 3ec94a6..0be9c90 100644 --- a/Assets/Scripts/Cannon.cs +++ b/Assets/Scripts/Cannon.cs @@ -21,12 +21,12 @@ public class Cannon : MonoBehaviour { private void Update () { - Vector2 screenPosition = Camera.main.WorldToScreenPoint(transform.position); - Vector2 direction = (Vector2)Input.mousePosition - screenPosition; - transform.rotation = Quaternion.LookRotation(Vector3.forward, direction); - spriteRenderer.flipX = direction.x < 0; if (harpoonAvailable) { + Vector2 screenPosition = Camera.main.WorldToScreenPoint(transform.position); + Vector2 direction = (Vector2)Input.mousePosition - screenPosition; + transform.rotation = Quaternion.LookRotation(Vector3.forward, direction); + spriteRenderer.flipX = direction.x < 0; if (Input.GetMouseButton(0)) { force = Mathf.Clamp(force + forceBuildingSpeed * Time.deltaTime, 0, maxForce);