private void CloseMenu() { if (SituationPanel == null) { SituationPanel = FindObjectOfType <SituationInfoUI>(); } if (VRMovementPlayer == null) { VRMovementPlayer = FindObjectOfType <VRMovement>(); } VRMovementPlayer.SetCanMove(true); SituationPanel.UnPause(); OptionPanel.OpenOption(false); }
private void Init() { Transform _independent = transform.Find("Independent"); if (!_independent.gameObject.activeInHierarchy) { GameObject _player = Instantiate(Resources.Load <GameObject>("Prefabs/GamePlay/TrainingItems/Player")); SetNormalPosition(_player); GameObject _hud = Instantiate(Resources.Load <GameObject>("Prefabs/GamePlay/TrainingItems/TutorialHUD")); SetNormalPosition(_hud); GameObject _clone = Instantiate(Resources.Load <GameObject>("Prefabs/GamePlay/TrainingItems/SAFETY_AWARENESS")); SetNormalPosition(_clone); trainingChapter = _clone; _clone = Instantiate(Resources.Load <GameObject>("Prefabs/GamePlay/TrainingItems/ValveOperations")); SetNormalPosition(_clone); valveChapter = _clone; _clone = Instantiate(Resources.Load <GameObject>("Prefabs/GamePlay/TrainingItems/DRILLING_RIG_UP")); SetNormalPosition(_clone); drillingChapter = _clone; _clone = Instantiate(Resources.Load <GameObject>("Prefabs/GamePlay/TrainingItems/EmergencySituation")); SetNormalPosition(_clone); EmergencySituation = _clone; } else { trainingChapter = _independent.Find("SAFETY_AWARENESS").gameObject; valveChapter = _independent.Find("ValveOperations").gameObject; drillingChapter = _independent.Find("DRILLING_RIG_UP").gameObject; EmergencySituation = _independent.Find("EmergencySituation").gameObject; } fireBoxInfo = FindObjectOfType <FireBoxInfo>(); situationInfoUI = FindObjectOfType <SituationInfoUI>(); hazardInfo = FindObjectOfType <HazardInfo>(); vRMovement = FindObjectOfType <VRMovement>(); DeactivateCurrentChapter(); }