// Use this for initialization
	void Start () {

		if (patrollEnemy) {
			patrollScript = EnemyObject.GetComponent<EnemyPatroll>();		
		}
		if (walkEnemy) {
			walkScript = EnemyObject.GetComponent<EnemyWalk>();		
		}

	}
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        _state = Type02State.Idle;

        _hp = 4;

        _enemy = GameObject.Find("EnemyType-02");
        _enemy.GetComponent <NavMeshAgent>().speed = 4;

        _patrol = _enemy.GetComponent <EnemyPatroll>();
    }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        _state = Type01State.Idle;

        _hp = 8;

        _player = GameObject.FindGameObjectWithTag("Player");
        _enemy  = GameObject.Find("EnemyType-01");
        _enemy.GetComponent <NavMeshAgent>().speed = 6;

        _patrol           = _enemy.GetComponent <EnemyPatroll>();
        _patrol._enemy    = GameObject.Find("EnemyType01");
        _patrol._eyePoint = _patrol._enemy.transform.Find("EyePoint");
    }
Ejemplo n.º 4
0
 void OnEnable()
 {
     enemyPat   = GetComponentInParent <EnemyPatroll>();
     myCollider = GetComponent <SphereCollider>();
 }
Ejemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        _state = Type03State.Idle;

        _patrol = GameObject.FindGameObjectWithTag("EnemyPatrol").GetComponent <EnemyPatroll>();
    }