private void FinishOffer() { RechargeMe(); m_Animator.SetBool("OfferFood", false); m_Walker.ResumeWalking(); m_offerState = WaiterOfferState.recharging; }
private void SetComponents() { m_Walker = GetComponent <SplineWalker>(); m_Collider = GetComponent <Collider>(); m_Animator = GetComponent <Animator>(); m_offerState = WaiterOfferState.free; }
private void OfferFood(Collider enteredMe) { m_Walker.PauseWalking(); Vector3 lookPos = enteredMe.transform.position; lookPos.y = transform.position.y; transform.LookAt(lookPos); m_Animator.SetBool("OfferFood", true); m_offerState = WaiterOfferState.offering; }
private IEnumerator Recharging(float time) { yield return(new WaitForSeconds(time)); m_offerState = WaiterOfferState.free; }
public void RechargeMe() { m_offerState = WaiterOfferState.recharging; StartCoroutine(Recharging(m_rechargeTimeLimit)); }