Example #1
0
 private void FinishOffer()
 {
     RechargeMe();
     m_Animator.SetBool("OfferFood", false);
     m_Walker.ResumeWalking();
     m_offerState = WaiterOfferState.recharging;
 }
Example #2
0
    private void SetComponents()
    {
        m_Walker   = GetComponent <SplineWalker>();
        m_Collider = GetComponent <Collider>();
        m_Animator = GetComponent <Animator>();

        m_offerState = WaiterOfferState.free;
    }
Example #3
0
    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;
    }
Example #4
0
    private IEnumerator Recharging(float time)
    {
        yield return(new WaitForSeconds(time));

        m_offerState = WaiterOfferState.free;
    }
Example #5
0
 public void RechargeMe()
 {
     m_offerState = WaiterOfferState.recharging;
     StartCoroutine(Recharging(m_rechargeTimeLimit));
 }