Added sitting animation
This commit is contained in:
@@ -1,25 +1,15 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class WaypointVisual : MonoBehaviour
|
||||
public class WaypointVisual : BaseInteractableObject
|
||||
{
|
||||
[SerializeField]
|
||||
private ParticleSystem _particleSystem;
|
||||
[SerializeField]
|
||||
private Transform _wayPoint;
|
||||
|
||||
private void Start()
|
||||
public void SetWaypoint(Vector3 position)
|
||||
{
|
||||
Player.Instance.OnPlayerMoves += Instance_OnPlayerMoves;
|
||||
}
|
||||
|
||||
private void Instance_OnPlayerMoves(object sender, OnPlayerMovesEventArgs e)
|
||||
{
|
||||
_wayPoint.position = e.PointToMove;
|
||||
_wayPoint.position = position;
|
||||
_particleSystem.Play();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
Player.Instance.OnPlayerMoves -= Instance_OnPlayerMoves;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user