Пример #1
0
 private void StartingInitiation()
 {
     enemyMovement  = enemyMovement ?? gameObject.GetComponent <EnemyMovementBase>();
     enemyAttractor = enemyAttractor ?? gameObject.GetComponent <EnemyAttractorEngine>();
     EnableInitiation();
     enemyAttractor.Attract(gameObject, stats);
 }
Пример #2
0
    float timer;                          // Timer for counting up to the next attack.


    void Awake()
    {
        // Setting up the references.
        homeBase       = GameObject.FindGameObjectWithTag("Base");
        player         = GameObject.FindGameObjectWithTag("Player");
        playerHealth   = player.GetComponent <PlayerHealth> ();
        homeBaseHealth = homeBase.GetComponent <PlayerHome> ();
        enemyHealth    = GetComponent <EnemyHealth>();
        movement       = GetComponent <EnemyMovementBase> ();
        anim           = GetComponent <Animator> ();
    }
Пример #3
0
 // Use this for initialization
 private void Start()
 {
     movementController = GetComponentInParent <EnemyMovementBase>();
     StartCoroutine(FireGun());
 }