示例#1
0
 //---Starting/Initializing functions---//
 void Start()
 {
     storeMaxSpeed = maxSpeed;
     targetSpeed   = storeMaxSpeed;
     rigidbody     = GetComponent <Rigidbody>();
     npcHealth     = GetComponent <TitanNPCHealth>();
 }
示例#2
0
    float timer;                                // Timer for counting up to the next attack.


    void Awake()
    {
        // Setting up the references.
        player       = GameObject.FindGameObjectWithTag("Player");
        playerHealth = player.GetComponent <TitanPlayerHealth>();
        enemyHealth  = GetComponent <TitanNPCHealth>();
        anim         = GetComponent <Animator>();
    }
示例#3
0
 // Use this for initialization
 void Start()
 {
     base.Start();
     isHostile   = true;
     hostileAI   = GetComponent <AI>();
     enemyHealth = GetComponent <TitanNPCHealth>();
     _hitPoints  = hitPoints;
 }
示例#4
0
    bool isSinking;                             // Whether the enemy has started sinking through the floor.

    void Awake()
    {
        // Setting up the references.
        //enemyAudio = GetComponent<AudioSource>();
        capsuleCollider = GetComponent <CapsuleCollider>();
        titanNPCHealth  = this;
        // Setting the current health when the enemy first spawns.
        currentHealth = startingHealth;
    }
示例#5
0
 // Use this for initialization
 void Start()
 {
     base.Start();
     npcHealth = GetComponent <TitanNPCHealth>();
     neutralAI = GetComponent <AI>();
 }