private void Start() { if (SteamVR.active) { _playerObject = GameObject.Find("[CameraRig]"); } else { _playerObject = GameObject.Find("DebugPlayerHead"); } _bossVisuals = _bossContainer.transform.GetChild(0).gameObject; _audioSource = GetComponent <AudioSource>(); _eyesObject.SetActive(false); _bossIdleAnimation = _bossVisuals.transform.GetChild(0).GetComponent <IdleInstrumentAnimation>(); _bossSmokeParticles = _bossVisuals.transform.GetChild(2).GetComponent <ParticleSystem>(); _bossSparkParticles = _bossVisuals.transform.GetChild(3).GetComponent <ParticleSystem>(); _bossTrailRenderer = _bossVisuals.GetComponent <TrailRenderer>(); _playerHead = _playerObject.GetComponentInChildren <Camera>().transform; _bossPhases.AddRange(Resources.LoadAll <BossPhase>("Phases")); _bossHealthBar.transform.parent.localScale = Vector3.zero; _maxHealth = _bossHealth; _explosionParticles = _bossVisuals.transform.GetChild(6).GetComponent <ParticleSystem>(); _uiManager = GameObject.Find("UIManager").GetComponent <UIManager>(); _gorillaManager = GameObject.Find("GorillaContainer").GetComponent <GorillaManager>(); FindCurrentID(); }
private void Start() { animator = GetComponent <Animator>(); gorillaManager = GetComponent <GorillaManager>(); cc = GetComponent <CharacterController>(); audioSource = GetComponent <AudioSource>(); }
public void StartM() { // いろいろ取得 camTr = Camera.main.transform; controller = GetComponent <CharacterController>(); playerConfig = Resources.Load <PlayerConfig>("PlayerConfigData"); gorillaManager = GetComponent <GorillaManager>(); gorillaAnimator = GetComponent <GorillaAnimator>(); humanGrabing = GetComponent <HumanGrabing>(); Resources.UnloadUnusedAssets(); }