private void Awake()
    {
        //情報取得
        _playerObject     = GameObject.Find("Player");
        _playerController = _playerObject.GetComponentInChildren <PlayerController>();

        _initialEquipmentObject = GameObject.Find("FlashLight");
        _initialEquipment       = _initialEquipmentObject.GetComponent <Item>();

        _enemyObject = GameObject.Find("Enemy_tutorial");
        _enemyBrain  = _enemyObject.GetComponentInChildren <ChangeTargetPoint>();

        _barrier = GameObject.Find("Barriers");

        _lampObject = GameObject.Find("Lamp_C");

        _lightEffectObject = GameObject.Find("Flash");
        _lightEffect       = _lightEffectObject.GetComponent <Light>();

        _tranquilizerObject = GameObject.Find("Tranquilizer");
        _tranquilizer       = _tranquilizerObject.GetComponent <Tranquilizer>();

        _keyItemObject = GameObject.Find("KeyItem");
        _keyItem       = _keyItemObject.GetComponent <KeyItem>();
    }
Example #2
0
    //敵がステージ上にいたら情報取得
    private void LoadEnemyInfo()
    {
        _enemyObject = GameObject.FindGameObjectWithTag("Enemy");

        if (_enemyObject != null)
        {
            _enemy      = _enemyObject.GetComponent <Enemy>();
            _enemyBrain = _enemyObject.GetComponentInChildren <ChangeTargetPoint>();
        }
    }
 //レベル2
 private void SecondLevelEffect()
 {
     //敵を生成、プレイヤーの移動速度を通常に戻す
     _player.WalkSpeed = _startSpeed;
     if (_enemyClone == null)
     {
         _enemyClone      = Instantiate(_enemyObject, _enemySpawnPoint.position, Quaternion.identity);
         _enemyClone.name = _enemyObject.name;
         _enemyScript     = _enemyClone.GetComponentInChildren <ChangeTargetPoint>();
         _volumeTest.SetTrigger("FearLevelUp");
     }
 }
Example #4
0
    private void Awake()
    {
        //情報取得
        _sceneChangeTriggerObject = GameObject.Find("SceneChangeEffectTrigger");
        _sceneChangeTrigger       = _sceneChangeTriggerObject.GetComponent <SceneChangeEffectTrigger>();

        _patrolObject = GameObject.Find("PatrolPoints");
        foreach (Transform child in _patrolObject.transform)
        {
            _patrolPoint.Add(child);
        }

        _agent = GetComponent <NavMeshAgent>();

        _enemyBrain = gameObject.GetComponentInChildren <ChangeTargetPoint>();

        audioSource = GetComponent <AudioSource>();
    }