Ejemplo n.º 1
0
    void OnTriggerStay(Collider collider)
    {
        clock += Time.deltaTime;
        if (collider.gameObject.tag == Tags.Leader)
        {
            this.gameObject.transform.LookAt(collider.transform);
            //PeopleAC.TurnOnSpot(collider.transform.position - this.gameObject.transform.position);
        }

        if (clock > 4.0f)
        {
            PeopleAC.StopClapHands();
            PeopleAC.StopSalute();
            PeopleAC.StopWaveHand();
        }
    }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        if (follower.GetFSM().CurrentState() == follower.States.HandClapingState)
        {
            // follower.PlusWaittime();
            timeclock += Time.deltaTime;
            // Debug.Log("follower is claping hands");
            PeopleAC.ClapHands();
            ClapHandsEffect.Instance().StartClapHandsEffet();
        }
        if (follower.GetWaittime() >= 3.2)
        {
            PeopleAC.StopClapHands();
            ClapHandsEffect.Instance().StopClapHandsEffet();
        }

        //follower.CleanWaittime();
        timeclock = 0;
    }