private void UpdateAnimation() { if (this.Crouching || (!this.Moving && this.Thinking)) { this.idleCount = 0; return; } if (this.Moving && this.Running) { this.idleCount = 0; AnimatorUtils.PlayOnce(this.animator, "Run"); } else if (this.Moving) { this.idleCount = 0; AnimatorUtils.PlayOnce(this.animator, "Walk"); } else { AnimatorUtils.PlayOnce(this.animator, "Idle"); } }
public void Action() { if (!this.HasCollidedInspect || this.Crouching) { return; } this.savedCollidedInspect = this.collidedInspect; var collidedInspectScript = this.savedCollidedInspect.GetComponent <Inspect>(); if (collidedInspect.tag == "Inspect") { if (collidedInspectScript.CrouchType) { AnimatorUtils.PlayOnce(this.animator, "StartCrouch"); } else { collidedInspectScript.StartSpeech(this.speechScript, this.SpeechName + ":"); } } else if (collidedInspect.tag == "Entry") { var entryScript = collidedInspect.GetComponent <Entry>(); if (entryScript != null && entryScript.Enabled && !entryScript.IsTrigger) { this.EnterRoom(entryScript); } } }
private void IncreaseIdleCount() { if (this.LongIdleWaitCount == 0) { return; } this.idleCount++; if (this.idleCount >= this.LongIdleWaitCount) { AnimatorUtils.PlayOnce(this.animator, "SThink"); } }
public void PlayStopCrouchAnimation() { AnimatorUtils.PlayOnce(this.animator, "StopCrouch"); }