void Start() { stanState = StanStates.SAD; crowd1State = crowd2State = crowd3State = crowdStates.CONVERSATION; crowd1 = new VisibilityTracker[3]; crowd2 = new VisibilityTracker[3]; crowd3 = new VisibilityTracker[4]; }
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(); }
void Start() { lookRightScale = transform.localScale; lookLeftScale = new Vector3(-lookRightScale.x, lookRightScale.y, lookRightScale.z); foreach (Transform child in transform) { if (child.tag == spriteHeadTag) { vizTrack = child.gameObject.GetComponent<VisibilityTracker>(); break; } } desperation = 0f; positionLastFrame = transform.parent.position; proclaimingSpot = GameObject.Find("ProclaimFromHere").transform.position; collectedGroups = 0; anim = GetComponent<Animator>(); currentState = StanStates.INITIAL_SITTING; }