This commit is contained in:
Gerard Gascón 2025-04-24 14:15:32 +02:00
commit 8103d0d89d
514 changed files with 211049 additions and 0 deletions

15
Assets/Scripts/Paralax.cs Normal file
View file

@ -0,0 +1,15 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Paralax : MonoBehaviour{
[SerializeField] GameObject reference;
[SerializeField] float scroll;
// Update is called once per frame
void Update(){
Vector2 pos = new Vector2(reference.transform.position.x * scroll, transform.position.y * .05f);
transform.position = pos;
}
}