diff --git a/Assets/Scenes/Level1.unity b/Assets/Scenes/Level1.unity index 5428279..f2d84d3 100644 Binary files a/Assets/Scenes/Level1.unity and b/Assets/Scenes/Level1.unity differ diff --git a/Assets/Scripts/FollowObject.cs b/Assets/Scripts/FollowObject.cs index 4d6144b..bdc7fd3 100644 --- a/Assets/Scripts/FollowObject.cs +++ b/Assets/Scripts/FollowObject.cs @@ -13,7 +13,7 @@ void Update() if (target) { Vector3 point = GetComponent().WorldToViewportPoint(target.position); - Vector3 delta = target.position - GetComponent().ViewportToWorldPoint(new Vector3(0.5f,0.09f, point.z)); //(new Vector3(0.5, 0.5, point.z)); + Vector3 delta = target.position - GetComponent().ViewportToWorldPoint(new Vector3(0.5f,0.08f, point.z)); //(new Vector3(0.5, 0.5, point.z)); Vector3 destination = transform.position + delta; transform.position = Vector3.SmoothDamp(transform.position, destination, ref velocity, dampTime); } diff --git a/Assets/Scripts/Lumberjack/LumberjackMovement.cs b/Assets/Scripts/Lumberjack/LumberjackMovement.cs index 828faef..61949a1 100644 --- a/Assets/Scripts/Lumberjack/LumberjackMovement.cs +++ b/Assets/Scripts/Lumberjack/LumberjackMovement.cs @@ -11,6 +11,9 @@ public class LumberjackMovement : MonoBehaviour { private float movex = 0f; public bool moveBackground = true; + public Sprite movingSprite; + public Sprite idleSprite; + // Use this for initialization void Start () { body = GetComponent(); @@ -35,10 +38,16 @@ void Update () if(movex > 0) { this.GetComponent().flipX = true; + this.GetComponent().sprite = movingSprite; } else if(movex < 0) { this.GetComponent().flipX = false; + this.GetComponent().sprite = movingSprite; + } + else + { + this.GetComponent().sprite = idleSprite; } } }