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); }
public virtual void Activate(GameObject parent) { this.m_Parent = parent; this.m_Parent.SetActive(true); this.m_ObjectiveIndex = 0; for (int i = 0; i < parent.transform.childCount; i++) { GameObject gameObject = parent.transform.GetChild(i).gameObject; gameObject.SetActive(true); if (gameObject.name == "Start") { Player.Get().Teleport(gameObject, false); } } if (this.m_Objectives.Count > this.m_ObjectiveIndex) { ObjectivesManager.Get().ActivateObjective(this.m_Objectives[this.m_ObjectiveIndex]); } MainLevel.Instance.m_TODSky.Cycle.DateTime = this.m_StartDate; MainLevel.Instance.m_TODSky.Cycle.GameTime = 0f; HUDChallengeTimer.Get().Activate(this); HUDChallengeInfo.Get().Activate(this); }