using Cinemachine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
///
/// 营业员走走停停
///
public class WorkerPathManager : MonoBehaviour
{
public CinemachineDollyCart cartman;
public CinemachineDollyCart cartwoman;
// Start is called before the first frame update
void Start()
{
StartWalkman();
StartWalkwoman();
}
// Update is called once per frame
void Update()
{
}
private void StartWalkman()
{
cartman.m_Speed = 0.9f;
cartman.GetComponentInChildren().SetBool("walk", true);
Invoke("Stopman", 10);
}
private void StartWalkwoman()
{
cartwoman.m_Speed = 0.9f;
cartwoman.GetComponentInChildren().SetBool("walk", true);
Invoke("Stopwoman", 7);
}
private void Stopman()
{
cartman.m_Speed = 0f;
cartman.GetComponentInChildren().SetBool("walk", false);
Invoke("StartWalkman", 3);
}
private void Stopwoman() {
cartwoman.m_Speed = 0f;
cartwoman.GetComponentInChildren().SetBool("walk", false);
Invoke("StartWalkwoman", 2);
}
}