Recerca-Cerdanya-Talk/Assets/Scripts/Level 8/PlayerFollower8.cs
Gerard Gascón e4cc23e7f0 Some things
2023-08-19 23:55:03 +02:00

16 lines
No EOL
320 B
C#

using UnityEngine;
namespace Level8 {
public class PlayerFollower8 : MonoBehaviour {
public void SetPosition(Vector3 position, bool grounded) {
if (grounded) {
transform.position = position;
return;
}
Vector3 pos = transform.position;
pos.x = position.x;
transform.position = pos;
}
}
}