void Update() { if (collectedGroups == 3) { currentState = StanStates.PROCLAIMING; cameraFollower.StopFollowingCamera(); } else { Debug.Log("Current observation state: " + vizTrack.Observed() + ", current state: " + currentState); if (currentState == StanStates.INITIAL_SITTING && vizTrack.Observed()) { currentState = StanStates.GATHERING_TOWNIES; //anim.SetBool("ntc", true); //anim.SetBool("isRunning", false); } if (currentState == StanStates.GATHERING_TOWNIES) { m_CurrentClipInfo = anim.GetCurrentAnimatorClipInfo(animationLayer); m_ClipName = m_CurrentClipInfo[0].clip.name; if (m_ClipName == "idle2" ) { cameraFollower.StartFollowingCamera(); } if (Input.GetKeyDown(",")) { currentState = StanStates.PROCLAIMING; cameraFollower.StopFollowingCamera(); } } } if (currentState == StanStates.PROCLAIMING) { Debug.Log("PROCLAIM! ETC"); transform.position = proclaimingSpot; //anim.SetBool("beingObserved", true); } HandleDesperation(); setAnimationFlags(); }
private void SetVisiblity() { bool viz = vizTrack.Observed(); myViz = viz ? Visibility.VISIBLE : Visibility.NOT_VISIBLE; }