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(); } }
// 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; }