public void Initialization() { if(combatFlightControllerGuide == null) combatFlightControllerGuide = transform.GetComponentInChildren<Flight_CombatFlightControllerGuide>(); if(enemyControllerGuide == null) enemyControllerGuide = transform.GetComponentInChildren<Flight_EnemyControllerGuide>(); if(gameControllerGuide == null) gameControllerGuide = transform.GetComponentInChildren<Flight_GameControllerGuide>(); if(Flight_StageController.Instance != null) { GameObject go = Flight_StageController.Instance.instantiatePlayerObject; go.transform.parent = combatFlightControllerGuide.transform; go.transform.localPosition = roleMeshPositon; go.transform.localRotation = Quaternion.identity; go.transform.localScale = Vector3.one; if(go.activeSelf.Equals(false)) { go.SetActive(true); } combatFlightControllerGuide.playerObject = go; } combatFlightControllerGuide.ResetDefault(); if(terrainCamera != null) { terrainCamera.transform.localPosition = terrainCameraPos; terrainCamera.transform.localEulerAngles = terrainCameraRot; terrainCamera.SetActive(true); } if(roleCamera != null) { roleCamera.transform.localPosition = roleCameraPos; roleCamera.transform.localEulerAngles = roleCameraRot; roleCamera.gameObject.SetActive(false); } combatFlightControllerGuide.SetAnimator(); combatFlightControllerGuide.SetDefaultPosition(); roleCamera.gameObject.SetActive(true); if(enemyControllerGuide != null) { enemyControllerGuide.HideMesh(); } if(gameControllerGuide != null) { gameControllerGuide.SetLeftGuide(); } if(Flight_StageController.isGuide) { combatFlightControllerGuide.isGuide = false; }else{ if(Flight_AudioManager.Instance != null) { Flight_AudioManager.Instance.ChangeAudioStep(AudioStep.Yindaoyu31,TwoAudio); } combatFlightControllerGuide.isGuide = true; } }
public void Initialization() { if (combatFlightControllerGuide == null) { combatFlightControllerGuide = transform.GetComponentInChildren <Flight_CombatFlightControllerGuide>(); } if (enemyControllerGuide == null) { enemyControllerGuide = transform.GetComponentInChildren <Flight_EnemyControllerGuide>(); } if (gameControllerGuide == null) { gameControllerGuide = transform.GetComponentInChildren <Flight_GameControllerGuide>(); } if (Flight_StageController.Instance != null) { GameObject go = Flight_StageController.Instance.instantiatePlayerObject; go.transform.parent = combatFlightControllerGuide.transform; go.transform.localPosition = roleMeshPositon; go.transform.localRotation = Quaternion.identity; go.transform.localScale = Vector3.one; if (go.activeSelf.Equals(false)) { go.SetActive(true); } combatFlightControllerGuide.playerObject = go; } combatFlightControllerGuide.ResetDefault(); if (terrainCamera != null) { terrainCamera.transform.localPosition = terrainCameraPos; terrainCamera.transform.localEulerAngles = terrainCameraRot; terrainCamera.SetActive(true); } if (roleCamera != null) { roleCamera.transform.localPosition = roleCameraPos; roleCamera.transform.localEulerAngles = roleCameraRot; roleCamera.gameObject.SetActive(false); } combatFlightControllerGuide.SetAnimator(); combatFlightControllerGuide.SetDefaultPosition(); roleCamera.gameObject.SetActive(true); if (enemyControllerGuide != null) { enemyControllerGuide.HideMesh(); } if (gameControllerGuide != null) { gameControllerGuide.SetLeftGuide(); } if (Flight_StageController.isGuide) { combatFlightControllerGuide.isGuide = false; } else { if (Flight_AudioManager.Instance != null) { Flight_AudioManager.Instance.ChangeAudioStep(AudioStep.Yindaoyu31, TwoAudio); } combatFlightControllerGuide.isGuide = true; } }