protected override void Update() { if (HUDChallengeResult.Get().enabled) { return; } this.UpdateModules(); int qualityLevel = QualitySettings.GetQualityLevel(); if (qualityLevel == 4) { this.UpdateInWater(); } if (this.m_Trap) { this.m_Trap.UpdateEffect(); } if (this.m_ID == AI.AIID.Jaguar) { float num = 0.2f; Vector3 size = this.m_BoxCollider.size; size.y = Mathf.Abs(this.m_Head.transform.position.y - base.transform.position.y) + num; this.m_BoxCollider.size = size; Vector3 center = this.m_BoxCollider.center; center.y = size.y * 0.5f; this.m_BoxCollider.center = center; } }
protected override void Update() { if (HUDChallengeResult.Get().enabled) { return; } this.UpdateModules(); if (QualitySettings.GetQualityLevel() == 4) { this.UpdateInWater(); } this.UpdateSwimming(); if (this.m_Trap) { this.m_Trap.UpdateEffect(); } if (this.IsCat()) { float num = 0.2f; Vector3 size = this.m_BoxCollider.size; size.y = Mathf.Abs(this.m_Head.transform.position.y - base.transform.position.y) + num; this.m_BoxCollider.size = size; Vector3 center = this.m_BoxCollider.center; center.y = size.y * 0.5f; this.m_BoxCollider.center = center; } this.UpdateInvisibleDuration(); float num2 = Mathf.Max(base.gameObject.transform.localScale.x, base.gameObject.transform.localScale.z); this.m_Radius = Mathf.Max(this.m_BoxCollider.size.x, this.m_BoxCollider.size.z) * num2 * 0.5f; }
private void OnFinish(bool success) { if (this.m_Objectives.Count > this.m_ObjectiveIndex) { ObjectivesManager.Get().DeactivateObjective(this.m_Objectives[this.m_ObjectiveIndex]); } HUDChallengeTimer.Get().Deactivate(); HUDChallengeInfo.Get().Deactivate(); HUDChallengeResult.Get().Activate(success, this); Player.Get().BlockMoves(); Player.Get().BlockRotation(); ChallengesManager.Get().OnFinishChallenge(success); }