]> git.lizzy.rs Git - SuperMouseAdventure.git/commitdiff
Merge branch 'size_fix' of https://github.com/KG0104/2DGame into main
authorElias Fleckenstein <eliasfleckenstein@web.de>
Sat, 30 Oct 2021 14:56:12 +0000 (16:56 +0200)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Sat, 30 Oct 2021 14:56:12 +0000 (16:56 +0200)
2DGame/Assets/Scenes/(1) Green_Idyll/green_idyll_10.unity
2DGame/Assets/Scripts/Background/Parallaxing.cs

index 96b1284773cf2d906fe4252e636cb10d966682ec..a55730afaf2bd2a3b89970c313373c226d366070 100644 (file)
@@ -2979,9 +2979,9 @@ SpriteRenderer:
   m_FlipX: 0
   m_FlipY: 0
   m_DrawMode: 2
-  m_Size: {x: 180, y: 9.001612}
+  m_Size: {x: 180, y: 20.5}
   m_AdaptiveModeThreshold: 0
-  m_SpriteTileMode: 1
+  m_SpriteTileMode: 0
   m_WasSpriteAssigned: 1
   m_MaskInteraction: 0
   m_SpriteSortPoint: 0
@@ -2994,7 +2994,7 @@ Transform:
   m_GameObject: {fileID: 520214744}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: -3.4, y: -17.8, z: 0}
-  m_LocalScale: {x: 2.000247, y: 4.559183, z: 1}
+  m_LocalScale: {x: 2, y: 2, z: 1}
   m_Children: []
   m_Father: {fileID: 0}
   m_RootOrder: 38
@@ -3189,7 +3189,7 @@ SpriteRenderer:
   m_DrawMode: 0
   m_Size: {x: 280, y: 64.8}
   m_AdaptiveModeThreshold: 0
-  m_SpriteTileMode: 1
+  m_SpriteTileMode: 0
   m_WasSpriteAssigned: 1
   m_MaskInteraction: 0
   m_SpriteSortPoint: 0
@@ -10652,7 +10652,7 @@ SpriteRenderer:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1107259358}
-  m_Enabled: 1
+  m_Enabled: 0
   m_CastShadows: 0
   m_ReceiveShadows: 0
   m_DynamicOccludee: 1
@@ -10692,7 +10692,7 @@ SpriteRenderer:
   m_DrawMode: 2
   m_Size: {x: 180, y: 13.7300005}
   m_AdaptiveModeThreshold: 0
-  m_SpriteTileMode: 1
+  m_SpriteTileMode: 0
   m_WasSpriteAssigned: 1
   m_MaskInteraction: 0
   m_SpriteSortPoint: 0
@@ -16001,7 +16001,7 @@ SpriteRenderer:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1851206811}
-  m_Enabled: 1
+  m_Enabled: 0
   m_CastShadows: 0
   m_ReceiveShadows: 0
   m_DynamicOccludee: 1
@@ -16039,9 +16039,9 @@ SpriteRenderer:
   m_FlipX: 0
   m_FlipY: 0
   m_DrawMode: 2
-  m_Size: {x: 180, y: 9.03}
+  m_Size: {x: 180, y: 15.5}
   m_AdaptiveModeThreshold: 0
-  m_SpriteTileMode: 1
+  m_SpriteTileMode: 0
   m_WasSpriteAssigned: 1
   m_MaskInteraction: 0
   m_SpriteSortPoint: 0
@@ -16054,7 +16054,7 @@ Transform:
   m_GameObject: {fileID: 1851206811}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: -3.4, y: -18.7, z: 0}
-  m_LocalScale: {x: 2.1661217, y: 3.4434092, z: 1}
+  m_LocalScale: {x: 2, y: 2, z: 1}
   m_Children: []
   m_Father: {fileID: 0}
   m_RootOrder: 39
index 3abc452140ea8a61e2a8c3e5aef5e76a24b26091..62952faa3973a078184222f4c76b472cbfaf2f69 100644 (file)
@@ -7,7 +7,7 @@ public class Parallaxing : MonoBehaviour
     [SerializeField] private Vector2 parallaxEffectMultiplier;
     [SerializeField] private bool infiniteHorizontal;
     [SerializeField] private bool infiniteVertical;
-    
+
     private Transform cameraTransform;
     Vector3 lastCameraPosition;
     private float textureUnitSizeX;
@@ -29,7 +29,7 @@ public class Parallaxing : MonoBehaviour
         transform.position += new Vector3(deltaMovement.x * parallaxEffectMultiplier.x, deltaMovement.y * parallaxEffectMultiplier.y);
         lastCameraPosition = cameraTransform.position;
 
-        if(infiniteVertical)
+        if(infiniteHorizontal)
         {
             if (Mathf.Abs(cameraTransform.position.x - transform.position.x) >= textureUnitSizeX)
             {
@@ -38,7 +38,7 @@ public class Parallaxing : MonoBehaviour
             }
         }
 
-        if(infiniteHorizontal)
+        if(infiniteVertical)
         {
             if (Mathf.Abs(cameraTransform.position.y - transform.position.y) >= textureUnitSizeY)
             {
@@ -47,4 +47,4 @@ public class Parallaxing : MonoBehaviour
             }
         }
     }
-}
\ No newline at end of file
+}