Esempio n. 1
0
    //------------------------------------
    //------------------------------------


    // Use this for initialization
    void Start()
    {
        _target         = PlayerManager.instance.player.transform;
        _agent          = GetComponent <NavMeshAgent>();
        _enemyNav       = GetComponent <EnemyNav>();
        _enemyHealth    = GetComponent <EnemyHealth> ();
        _animController = GetComponent <GoblinAnimationController>();
        _enemyGenerator = GameObject.Find("EnemyGenerator").GetComponent <EnemyGenerator> ();
        _fieldOfView    = GetComponent <FieldOfView> ();
        if (_target)            //視野表示のターゲットを_targetに変更
        {
            _fieldOfView.SetTarget(_target);
        }
        _state         = State.LOCOMOTION;
        _soundReaction = GetComponent <EnemySoundReaction> ();
        _lockOn        = false;
        _lockOnRadius  = _fieldOfView.GetLookRadius() / 2;
        _goblinList    = _enemyGenerator.GetGoblinList( );
        _findedBomb    = null;
    }
Esempio n. 2
0
 //--_goblinListを更新する関数(なくてもいいかも)
 void UpdateGoblinList()
 {
     _goblinList = _enemyGenerator.GetGoblinList( );
 }