using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerSprite : MonoBehaviour
{
	[SerializeField]
	private Vector3Asset playerVelocityAsset;

	[SerializeField]
	private GameObject standSprite;

	[SerializeField]
	private GameObject swingSprite;

	private void Update()
	{
		transform.localScale = new Vector3(Mathf.Sign(playerVelocityAsset.GetVector().x), 1f, 1f);

		bool standing = (Mathf.Abs(playerVelocityAsset.GetVector().x) < 0.001f);
		standSprite.SetActive(standing);
		swingSprite.SetActive(!standing);
	}
}
