private void Update() { if (!CoopPeerStarter.DedicatedHost) { FMODCommon.UpdateLoopingEvents(this.loopingEvents, this.animator, base.transform); } base.transform.hasChanged = false; if (this.animator) { AnimatorStateInfo currentAnimatorStateInfo = this.animator.GetCurrentAnimatorStateInfo(0); if (currentAnimatorStateInfo.tagHash == this.idleHash) { if (this.mainWeaponCollider && this.mainWeaponCollider.enabled) { this.mainWeaponCollider.enabled = false; } if (this.leftWeaponCollider && this.leftWeaponCollider.enabled) { this.leftWeaponCollider.enabled = false; } } if (currentAnimatorStateInfo.fullPathHash == this.idleStateHash) { if (!this.inIdleState) { this.idleTimeoutEnd = Time.time + 2f; } this.inIdleState = true; } else { this.inIdleState = false; } } }
private void Update() { if (this.animator != null) { FMODCommon.UpdateLoopingEvents(this.loopingEvents, this.animator, this.eventTransform); } if (this.eventTransform.hasChanged && this.oneshotsFollowTransform) { int count = this.oneshotEvents.Count; for (int i = 0; i < count; i++) { UnityUtil.ERRCHECK(this.oneshotEvents[i].instance.set3DAttributes(this.eventTransform.to3DAttributes())); } } this.eventTransform.hasChanged = false; }
private void Update() { if (!CoopPeerStarter.DedicatedHost) { FMODCommon.UpdateLoopingEvents(this.loopingEvents, this.animator, base.transform); } base.transform.hasChanged = false; if (this.animator) { if (this.animator.GetCurrentAnimatorStateInfo(0).fullPathHash == this.idleStateHash) { if (!this.inIdleState) { this.idleTimeoutEnd = Time.time + 2f; } this.inIdleState = true; } else { this.inIdleState = false; } } }