33 lines
656 B
C#
33 lines
656 B
C#
using Core.SaveLoad;
|
|
using UnityEngine;
|
|
|
|
public class BeltSnatchBehaviour : MonoBehaviour
|
|
{
|
|
public GameObject beltObject;
|
|
public AppleMachine stateMachine;
|
|
public Animator walkingWorkerAnimator;
|
|
|
|
private Animator beltWorkerAnimator;
|
|
|
|
public void OnEnable()
|
|
{
|
|
beltWorkerAnimator = GetComponent<Animator>();
|
|
}
|
|
|
|
public void EnableBeltInteraction()
|
|
{
|
|
beltObject.SetActive(true);
|
|
}
|
|
|
|
public void TransitionToReturnState()
|
|
{
|
|
stateMachine.ChangeState("WorkerReturning");
|
|
}
|
|
|
|
public void BeltSnatched()
|
|
{
|
|
beltWorkerAnimator.SetBool("beltSnatched?", true);
|
|
|
|
}
|
|
}
|