diff --git a/Assets/Art Assets/Textures/Environ/backdrop/clouds1.png b/Assets/Art Assets/Textures/Environ/backdrop/clouds1.png index d90c153..d383df1 100644 --- a/Assets/Art Assets/Textures/Environ/backdrop/clouds1.png +++ b/Assets/Art Assets/Textures/Environ/backdrop/clouds1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:83d2fcce55cf7320c34e4c275e7b321f5e4b15e5bab29610c5a111a8e743a5fa -size 3575 +oid sha256:df98cf5757fd7573c2aaeb9ea88e7cc556f092bba2b22c0b7e657ba2f6789acc +size 3915 diff --git a/Assets/Art Assets/Textures/Environ/backdrop/clouds2.png b/Assets/Art Assets/Textures/Environ/backdrop/clouds2.png index 6232cac..d52007c 100644 --- a/Assets/Art Assets/Textures/Environ/backdrop/clouds2.png +++ b/Assets/Art Assets/Textures/Environ/backdrop/clouds2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9de5c69b4977d997aa4b93024177ad8ba8d0538c9b123e51ff1b8bc883b72084 -size 4105 +oid sha256:64044a39f1c3f858867c3377c73658bafeed4aff3196c4e40f4f55eee7cd1383 +size 2630 diff --git a/Assets/Art Assets/Textures/Environ/backdrop/clouds3.png b/Assets/Art Assets/Textures/Environ/backdrop/clouds3.png index 1c92bcb..523d236 100644 --- a/Assets/Art Assets/Textures/Environ/backdrop/clouds3.png +++ b/Assets/Art Assets/Textures/Environ/backdrop/clouds3.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:08749da9e2ffa2c14e1a473c4b0628b57727c5d6d846b918213e6b3be71a34e1 -size 3133 +oid sha256:f6bd96a44903b2cc626e2156a7bcb58316eae1b0d276b06e5931867b37b6ddc2 +size 3325 diff --git a/Assets/Scenes/Level 2.unity b/Assets/Scenes/Level 2.unity index 9ea2e26..ea9bca9 100644 --- a/Assets/Scenes/Level 2.unity +++ b/Assets/Scenes/Level 2.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a327417ddd3a8a97ade829209df0899f1aa0a0f64feb603ce89eb0d8f2cbebb3 -size 459980 +oid sha256:dddbdbd0de6bbed79859a74b4548808737e48868489f5a17da0982e3417b4fb5 +size 461758 diff --git a/Assets/Scripts/Parallax.cs b/Assets/Scripts/Parallax.cs new file mode 100644 index 0000000..f5857cb --- /dev/null +++ b/Assets/Scripts/Parallax.cs @@ -0,0 +1,24 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class Parallax : MonoBehaviour +{ + private float length, startpos; + public GameObject cam; + public float parallaxEffect; + + void Start() + { + startpos = transform.position.x; + length = GetComponent().bounds.size.x; + } + + // Update is called once per frame + void FixedUpdate() + { + float dist = (cam.transform.position.x * parallaxEffect); + + transform.position = new Vector3(startpos + dist, transform.position.y, transform.position.z); + } +} diff --git a/Assets/Scripts/Parallax.cs.meta b/Assets/Scripts/Parallax.cs.meta new file mode 100644 index 0000000..bb21ec6 --- /dev/null +++ b/Assets/Scripts/Parallax.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c27236bc6c2676e4bbfdb1265c9f7936 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: